title: Initialize array of custom objects in javascript
body: <p>I have data coming in from the db I need to store in a js array of objects. How do I initialize this js array of objects , so that I can keep adding the data when I get it from the db .</p>
  
  <p>The object structure will be of this format</p>
  
  <pre><code>var OsNames = [{deviceName:"TV",
  releases: [
  {release: "rel1", hws : [{hw:"h1"},{hw:"h2"},{hw:"h3"}]},
  {release: "rel2", hws: [{hw:"h1"},{hw:"h2"},{hw:"h3"}]}
  ]},
  {deviceName:"Phone",
    releases: [
    {release: "rel1", hws: [{hw:"h1"},{hw:"h2"},{hw:"h3"}]},
    {release: "rel2", hws: [{hw:"h1"},{hw:"h2"},{hw:"h3"}]}]
  }];
  </code></pre>