I am in possession of the JSON data shown below:
[
{
"AVG_VALUE" : "2540",
"MAX_VALUE" : "2540",
"SUM_VALUE" : "2540",
"MIN_VALUE" : "2540",
"METRICID" : "100248060212",
"START" : "1449216120000",
"STARTTIME" : "09:02"
}
,
{
"AVG_VALUE" : "2624",
"MAX_VALUE" : "2708",
"SUM_VALUE" : "5248",
"MIN_VALUE" : "2540",
"METRICID" : "100248060219",
"START" : "1449216120000",
"STARTTIME" : "09:02"
}
]
However, I am uncertain on how to extract the values from it. Currently, I am utilizing the dojo toolkit and have generated my file using the following code snippet:
var stream = dojo.xhrGet({
url : self.jsonFile,
content : {
startTime : 1449136661084,
endTime : 1449482261084,
interValMillis : (interval * 1000),
metricid : 100248060219
},
handleAs : "json",
sync : true,
load : function(response, ioArgs) {
self.data = response;
self._metricIds = _metricIds;
self._params = _params;
self.convertData(self);
console.log("ok:"+response);
data = response;
}
});
After executing the above code, all the values now reside in my 'response' variable. However, I am unsure how to access it to retrieve, for example, the value of the first AVG_VALUE field.