Last active
June 23, 2020 17:26
-
-
Save gaboesquivel/58e8ca9f70a10e02cf63 to your computer and use it in GitHub Desktop.
convert all keys a of javascript object to lowercase with lodash
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
_.transform(obj, function (result, val, key) { | |
result[key.toLowerCase()] = val; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
or