I would like to create an object like this:

```
"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"
}

```

I tried something like this:

```
var storeArray = [];
for(var i = 0; i < response.data.bookInfo.length; i++){
  var keys = Object.keys(response.data.bookInfo[i]);
  var storename = keys.filter(key => key != 'isbn' && key != 'metadata'); // get storename

  if(storeArray[storename] == undefined){
    storeArray[storename] = response.data.bookInfo[i];
  }
  else{
    storeArray[storename].push(response.data.bookInfo[i]);
  }
}

```

But this just gets me the following error:

> 
> TypeError: storeArray["amazon"].push is not a function
> 
> 
> 

When I use `storeArray[storename] = response.data.bookInfo[i]`, 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.