title: Knockout - data is not retrieved from an observable array
body: <p>I'm developing part of the web GUI which displays VM sets available during tenant creation in a cloud. The object representing this set looks like this:</p>
  
  <pre><code>function BoxTemplate(data) {
      var self = this;
      self.id = ko.observable(0);
      self.name = ko.observable("");
      self.description = ko.observable("");
  
      if (data) {
          self.id(data.Id);
          self.name(data.Name);
          self.description(data.Description);
      }
  }
  </code></pre>
  
  <p>In the next step I'm trying to retrieve just IDs from the array fo the above objects. The code is as the following:</p>
  
  <pre><code>var boxTemplatesIds = ko.observableArray([]);
  
  for (var i = 0; i &lt; self.boxTemplatesList.length; i++) {
      boxTemplatesIds.push(self.boxTemplatesList()[i].id);
  }
  
  var boxTemplatesIdsAsJson = ko.toJSON(boxTemplatesIds);
  </code></pre>
  
  <p>The <code>boxTemplatesIdsAsJson</code> is then passed as an argument in the request body. However, when I print it, it's empty and null is passed to the appropriate argument in the underlaying REST API. I tried different approaches, but it was for none. Can You help me figure out what is wrong with my code? I'd be grateful. :)</p>