Skip to content

Instantly share code, notes, and snippets.

@sukhchander
Created June 18, 2014 14:41
Show Gist options
  • Save sukhchander/6ddd2baa486c32f375d3 to your computer and use it in GitHub Desktop.
Save sukhchander/6ddd2baa486c32f375d3 to your computer and use it in GitHub Desktop.
collapse entries
input = [
{ time: 201_201, x: 2 },
{ time: 201_201, y: 7 },
{ time: 201_201, z: 2 },
{ time: 201_202, a: 3 },
{ time: 201_202, b: 4 },
{ time: 201_202, c: 0 }
]
output = [
{ time: 201_201, x: 2, y: 7, z: 2 },
{ time: 201_202, a: 3, b: 4, c: 0 }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment