Given a key: 'mykey'
And given an object: Object {Mykey: "some value", ...}
And using the following if (key in myObject)
syntax to check for a match...
How can I check matching strings regardless of capital letters?
For example: key mykey
should be matched to Mykey
in the object even though the M
is capitalized.
I am aware of a function to do this: How to uppercase Javascript object keys?
I was looking to see if there was another way.