Please see this example: JsFiddle
Question: I have the following JSON Array
y= [ {\"LngTrend\":15,\"DblValue\":10,\"DtmStamp\":13582260
var y = [
{"LngTrend":15,"DblValue":10,"DtmStamp":1358226000000},
{"LngTrend":16,"DblValue":92,"DtmStamp":1358226000000},
{"LngTrend":17,"DblValue":45,"DtmStamp":1358226000000},
{"LngTrend":18,"DblValue":87,"DtmStamp":1358226000000},
{"LngTrend":15,"DblValue":10,"DtmStamp":1358226060000},
{"LngTrend":16,"DblValue":87,"DtmStamp":1358226060000},
{"LngTrend":17,"DblValue":45,"DtmStamp":1358226060000},
{"LngTrend":18,"DblValue":92,"DtmStamp":1358226060000},
];
var x = {};
for(var k in y){
if(x[y[k]["DtmStamp"]] == undefined)
x[y[k]["DtmStamp"]] = [];
x[y[k]["DtmStamp"]].push(y[k]["DblValue"])
}
alert(JSON.stringify(x))
console.log(x);
See http://plnkr.co/edit/511sKSdzHGYuvpYqKCPD?p=preview