title: Post knockout observable array as object property asp.net mvc
body: <p>I'm trying to post an ko.observable array as part of of an object, all that data reaches the server ok except for the array which is not null but has a count of zero.</p>
  
  <p><strong>This is on the client side</strong></p>
  
  <pre><code>    function submitAsync() {
      var viewModel = constructModel();
  
      setTimeout(function () {
          $.ajax({
              url: '/Article/Index',
              type: 'POST',
              data: JSON.stringify({ viewModel: viewModel }),
              contentType: 'application/json; charset=utf-8',
          })
      },2000);
      console.log(viewModel);
  }
  
  function constructModel(){
      var articleViewModel = {};
      articleViewModel.Authors = ko.toJSON(appViewModel.authors);
  
      articleViewModel.ArticleData = {};
      articleViewModel.ArticleData.Title = $("#ArticleData_Title").text();
      articleViewModel.ArticleData.CorespondingAuthor = $("#ArticleData_CorespondingAuthor").text();
      articleViewModel.ArticleData.Keywords = $("#ArticleData_Keywords").text();
  
      articleViewModel.ArticleContent = {};
      articleViewModel.ArticleContent.Abstract = $("#ArticleContent_Abstract").text();
      articleViewModel.ArticleContent.FullText = ArticleContent();
  
      return articleViewModel;
  }
  </code></pre>
  
  <p><strong>My viewModel</strong></p>
  
  <pre><code>public class ArticleViewModel
  {
      public ArticleData ArticleData { get; set; }
      public ArticleContent ArticleContent { get; set; }
      public ICollection&lt;Author&gt; Authors { get; set; }
  }
  </code></pre>
  
  <p><strong>My controller action</strong> viewModel.Authors is not null but has a count of 0</p>
  
  <pre><code>[HttpPost]
          public ActionResult Index(ArticleViewModel viewModel)
          {
              if (ModelState.IsValid)
              {
                  mergeViewModelToCurrentArticle(viewModel);
                  _documentPath = GenerateDocument(_currentArticle);
                  return RedirectToAction("Success");
              }
              return View();
          }
  </code></pre>
  
  <p><strong>The ko array outputed from javascript</strong></p>
  
  <pre><code>Authors: "[{"id":1,"firstName":"User first name","lastName":"user last name","email":"user@gmail.com","phone":"xxxxx","address":"Dunarii Nr.3","fullName":"user full name"}]"
  </code></pre>