title: How to put javascript array into MVC Model View array?
body: <p>In one view i create an array in javascript that contains ids of elements and now i want to pass them into model field in my MVC Model does anybody already meet ith this kind of problem this is my model: </p>
  
  <pre><code>public class AppointmentModel
  {
      public int Id { get; set; }
      public string Title { get; set; }
      public int[] PersonsIds { get; set; }
      public int[] CompaniesIds { get; set; }
  }
  </code></pre>
  
  <p>and in view i keep both arrays as hidden fields</p>
  
  <pre><code>@html.hiddenfor(model =&gt; model.PersonsIds)
  @html.hiddenfor(model =&gt; model.CompaniesIds)
  </code></pre>
  
  <p>so the schema looks like this:</p>
  
  <pre><code>javascript-&gt;model-&gt;submit model-&gt;controller
  </code></pre>
  
  <p>Please any help would be appreciate </p>