lets say I have object like this:
{
1: [1,2,3],
2: [4,6,7],
3: [5, 8,9,10]
etc..
}
Now i want to get value and a key by value. So my input would be: 5 and I need to get key and value of a object that contains that 5, so it is 3:[5,8,9,10]
in the example above. The key is important just like value of a object. Is there a method for that in JS? Something like Includes on arrays or I need to loop throu it? What if object has like 10k keys?