jQuery get json with nested arrays

jQuery get json with nested arrays

Hi, I'm trying to access the following json data:




The script that I'm attempting to use:

  1.         var chart = new ApexCharts(document.querySelector("#chart2"), options);
  2.         chart.render();
  3.       
  4.       
  5.         $.getJSON('url', function(data) {
  6.     
  7.     jQuery.each(data.results.events.dataUpdates, function (i, result) {
  8.                 chartdata[i] = [];
  9.                 chartdata[i]['text'] = result['date'];
  10. chartdata[i]['text'] = result['old'];
  11. chart.updateSeries([{
  12.           name: 'Sales',
  13.           data: chartdata
  14.         }])
  15.       });
Any help would be greatly appreciated. Thank you!