title: how to get the item of an array, selected in the select with svelte?
body: <p>I have the following formData object which has the properties that I read from the input and the select, but I don't really understand how to make the select only select the option I choose, since when submitting it sends all the objects of the users array and not the one selected in the select</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script&gt;
  
   let users_options = [
      {id:22, name: "lana"},
      {id:33,name:"John"}
      {id:45,name:"avril"}
  ]
  
  let formData = {
      id:5,
      users: users_options
      name:"",
      email:""
  }
      
      function send(){
          console.log(formData);
      }
  
  
  &lt;/script&gt;
  
  
  &lt;form on:submit|preventDefault={send}&gt;
  
    &lt;label&gt;name&lt;/label&gt; &lt;br&gt;
    &lt;input type="text" 
    bind:value={formData.name}
    on:input={ e =&gt; (formData.name =&gt; e.target.value)}
    /&gt;
    
    &lt;label&gt;email&lt;/label&gt;
    
    &lt;input type="email" bind:value={formData.email}
    on:input={ e =&gt; (formData.email =&gt; e.target.value)}
    /&gt;
  
    &lt;label&gt;Select user&lt;/label&gt;&lt;br&gt;
    
    &lt;select&gt;
      {#each formData.users as item (item.id)}
        &lt;option value={item.name}&gt;{item.name}&lt;/option&gt;
      
      {/each}
    
    &lt;/select&gt;
    
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>