When I parse JSON data, I am retrieving 3 values in each node.
$.each($.parseJSON(data), function (key, val) {
Var X = val.date;
Var y = val.type;
Var z = val.text;
});
An example of JSON data is as follows:
val.date= '2011/02/09', val.type=3, val.text = 'Some text'
I want to store these values in an array like this:
var arrA = new Array();
arrA[0] = new Array(X,Y,Z);
arrA[1] = new Array(X,Y,Z); etc
With X, Y, Z changing for every node in the JSON data. Ultimately, my arrA should contain the following data:
['2011/02/09', 3, 'Some text'],
['2011/12/11', 3, 'something to show']
.
.
.
['2011/02/08,3,'something else']
Can someone suggest the best way to achieve this?
Many thanks, Adarsh