Dynamically Creating Json Array Javascript

๐Ÿ‘:0

temp.dataset is an array, and you are trying to use data, an object, as an index.

It should be something like:

temp.dataset[0].push(data.points[index].num_request);

(or whatever the index should be) not:

temp.dataset[data].push(data.points[index].num_request);

Leave a comment