I have an array of objects that looks like this:
event_id=[{\"0\":\"e1\"},{\"0\",\"e2\"},{\"0\",\"e4\"}];
How do I add an element to that a
Since I want to add the object in the middle of the array, I ended with this solution:
var add_object = {"0": "e5"}; event_id.splice(n, 0, add_object); // n is declared and is the index where to add the object