Home forums Using CanvasJS Ignore part of JSON Reply To: Ignore part of JSON

#22647

Vishwas R
Keymaster

@wonky,

CanvasJS just renders the chart with the data that you have passed in chart-option. You can use AJAX getJSON to get the JSON data and with the help of key, you can get its corresponding value. Please refer this tutorial for the same.

Example: If you are storing json {"Success":true,"Error":null,"Data":[{}]} as test.json, you can access Data using jsonData.Data where jsonData is the response that you get from AJAX request.


$.getJSON("test.js", function(jsonData) {
    var data = jsonData.Data;
 });


Vishwas R
Team CanvasJS