Created
March 25, 2015 21:28
-
-
Save joscha/bd2f0ae548d1e3c99f1d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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