I have the following object:-
var list = {
nums: [
[117],
[108]
],
numsset: [
[2256, 2265],
[234],
[3445, 3442]
]
};
If I had an input field on the page where a customer typed a number, how would I then be able to search the object for that value and return the key eg.
Input Returned
108 nums
3445 numsset
2872
2265 numsset
I have attempted looping through, but it didn't produce the required result.
Any help would be greatly appreciated, and thank you in advance.