Initially my variable is empty.
var data = [];
After insertion of record it should be like,
data = [
{ "date" : "2013-01-01", "open" : 45 },
{ "date" : "2013-02-01", "open" : 50 }
];
Inserting new attribute to existing data,
data = [
{ "date" : "2013-01-01", "open" : 45 , "close": 49},
{ "date" : "2013-02-01", "open" : 50 , "close": 60}
];
How can we handle these 2 scenarios using JavaScript or J Query?