Why not just var history = []; and then each element is {time: 33512635, data: {...}}

Ensures they are always exactly in sync, as a requirement of the data structure.