I am developing JMAKI widgets,my task is to display the json data in a html page through javascript.
What's the best way to access the json data through javascript?
if you have the json object already just access as you would with a normal object:
// Creating the JSON object from string
var obj = JSON.parse('{"attr1": 10, "attr2": "Some value"}');
// You can access it like this
var a = obj.attr1;
var b = obj.attr2;
console.log(a, b); // Will print 10, "Some value"
For me that is the best way to access a JSON object (not the only one) it feels more natural for me.