Created
November 8, 2016 11:44
-
-
Save LouisaKB/4037a9784bb1c0d93316e5ed3764524e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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