title: Javascript push is not a function
body: <p>I would like to create an object like this:</p>
  
  <pre><code>"store1":
  {
    "isbn":"3129321903",
    "title":"here comes the title",
    "author":"author of the book"
  },
  {
   "isbn":"3333333333",
   "title":"title of second book",
   "author":"author of second book"
  }
  "store2":
  {
    "isbn":"3333311111",
    "title":"title of book from store2",
    "author":"author of book from store2"
  }
  </code></pre>
  
  <p>I tried something like this:</p>
  
  <pre><code>var storeArray = [];
  for(var i = 0; i &lt; response.data.bookInfo.length; i++){
    var keys = Object.keys(response.data.bookInfo[i]);
    var storename = keys.filter(key =&gt; key != 'isbn' &amp;&amp; key != 'metadata'); // get storename
  
    if(storeArray[storename] == undefined){
      storeArray[storename] = response.data.bookInfo[i];
    }
    else{
      storeArray[storename].push(response.data.bookInfo[i]);
    }
  }
  </code></pre>
  
  <p>But this just gets me the following error:</p>
  
  <blockquote>
    <p>TypeError: storeArray["amazon"].push is not a function</p>
  </blockquote>
  
  <p>When I use <code>storeArray[storename] = response.data.bookInfo[i]</code>, it only shows me one row in console, I would like to add the response data to storeArray[storename] to get a list of books by store.</p>