Approach 1: In this approach, the key is passed to the function and while comparing, Use toLowerCase() method to transform the passed key as well as object’s key to lowercase. Then compare the keys and if they are same then return its value.
Approach 2: The approach here is same as in previous example, The Object.keys() method is used and the operation is performed in a compact manner.
- Basics of SOAP - Simple Object Access Protocol
- CSS | The object-fit Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.