Skip to content

Instantly share code, notes, and snippets.

@joscha
Created March 25, 2015 21:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joscha/bd2f0ae548d1e3c99f1d to your computer and use it in GitHub Desktop.
Save joscha/bd2f0ae548d1e3c99f1d to your computer and use it in GitHub Desktop.
function prettifySpreadsheetJSON(data) {
var prefix = 'gsx$';
for (var i = 0; i < data.feed.entry.length; i++) {
for (var key in data.feed.entry[i]) {
if (data.feed.entry[i].hasOwnProperty(key) && key.substr(0,prefix.length) === prefix) {
data.feed.entry[i][key.substr(prefix.length)] = data.feed.entry[i][key].$t;
delete data.feed.entry[i][key];
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment