i have obj of array
var data = [{
value: 1,
t: 1487203500000
}, {
value: 2,
t: 1487213700000
}];
here, i need to compare t obj at inside a loop, if it is exceeds 5 mins, then i need to create a one item with value of null and append into that array.
Expected result will be
var data = [{
value: 1,
t: 1487203500000
}, {
value: null,
t: null
} {
value: 2,
t: 1487213700000
}];
while appending i need to push into same index and existing value should be readjusted.