Created
February 22, 2013 10:24
-
-
Save bryanhelmig/5012388 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
results = JSON.parse(bundle.response.content); | |
// assuming results is an array of objects, object being the full json you pasted | |
out = _.map(results, function(result){ | |
// handle properties, ignoring versions | |
result.properties = _.object(_.map(result.properties, function(valueSet, key){ | |
return [key, valueSet.value]; | |
})); | |
// similar code to handle examples of {key: Array()}, maybe using _.first? | |
return result; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment