I have the following issue, I'm trying to merge an array into another array with a specific key. For example:
var params = new Array();
params.push({"category":<?php json_encode($category)?>});
So far so good. params is now a filled array with some key called "category".
But when i want to call that array, it says params.category undefined!
I can call it like params[0].category.
How can i remove the leading 0 key?
I have tried concat but with the same result.