Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // http://stackoverflow.com/a/10196772/173630
- function allKeysToLowerCase(obj) {
- var output = {};
- for (i in obj) {
- if (Object.prototype.toString.apply(obj[i]) === '[object Object]'
- || Object.prototype.toString.apply(obj[i]) === '[object Array]'
- ) {
- output[i.toLowerCase()] = allKeysToLowerCase(obj[i]);
- } else {
- output[i.toLowerCase()] = obj[i];
- }
- }
- return output;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement