Here is my custom Object made for comparsion.. from the response i get the value and now i have to match the value with the keys in this object and return the key.
Here is my custom Object made for comparsion.. from the response i get the
Share
That could work for you:
The
for..inclause iterates through all of the keys of the object. That’s if you want to check the value you get against theKeysof your object. If you want to check the value against theValuesof your object, do the following: