Skip to content

Instantly share code, notes, and snippets.

@neurotech
Created June 20, 2014 13:06
Show Gist options
  • Save neurotech/6bbd67365fbdf9729eb1 to your computer and use it in GitHub Desktop.
Save neurotech/6bbd67365fbdf9729eb1 to your computer and use it in GitHub Desktop.
var output = {};
output.results = [];
_.each(data.results, function(object) {
var records = {};
var keys = Object.keys(object);
for (var i = 0; i < keys.length; i++) {
records[camelCase(keys[i])] = object[keys[i]];
};
output.results.push(records);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment