Here is the object that I am working with:
var list = {
nums: [
[117],
[108]
],
numsset: [
[2256, 2265],
[234],
[3445, 3442]
]
};
Imagine there is an input field on the page where a user can type a number. How can I search the object for that value and return the corresponding key?
Input Returned
108 nums
3445 numsset
2872
2265 numsset
I tried looping through the object but did not get the desired result.
Any assistance you can provide would be greatly appreciated. Thank you in advance.