Created
July 23, 2013 07:31
-
-
Save ghostbar/6060504 to your computer and use it in GitHub Desktop.
This was asked on angular@googlegroups. Azure servers have the params being case-sensitive and that's anti-consistency for how most people code today. So this is the easier solution using underscore/lodash. The `newObject` will end up with all the keys lowercased.
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
var search = $location.search(); | |
var newObject = {}; | |
_.each(search, function(value, key) { | |
newObject[key.toLowercase()] = value; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment