jQuery get json with nested arrays
Hi, I'm trying to access the following json data:
The script that I'm attempting to use:
- var chart = new ApexCharts(document.querySelector("#chart2"), options);
- chart.render();
-
-
- $.getJSON('url', function(data) {
-
- jQuery.each(data.results.events.dataUpdates, function (i, result) {
- chartdata[i] = [];
- chartdata[i]['text'] = result['date'];
- chartdata[i]['text'] = result['old'];
-
- chart.updateSeries([{
- name: 'Sales',
- data: chartdata
- }])
- });
Any help would be greatly appreciated. Thank you!