Skip to content

Instantly share code, notes, and snippets.

@LouisaKB
Created November 8, 2016 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save LouisaKB/4037a9784bb1c0d93316e5ed3764524e to your computer and use it in GitHub Desktop.
Save LouisaKB/4037a9784bb1c0d93316e5ed3764524e to your computer and use it in GitHub Desktop.
function getTimes(responseText) {
var points = JSON.parse(responseText).sources.source1.points;
var keys = Object.keys(points);
return keys.map(function (key) {
return { name: key, time: points[key].time };
}).sort(function (a, b) {
return a.time - b.time;
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment