I want to search in an object that has objects inside it
My object looks like this:
let foo = {
65:{
foo: 'bar',
bar: 'amet',
dolor: 'foo'
},
66:{
foo: 'foo',
bar: 'sit',
dolor: 'amet'
},
70:{
foo: 'amet',
lorem: 'amet',
bar: 'sit'
}
}
I want a search function that searches through all values of all objects inside foo And then return a list of numbers of results
e.g. if I search for 'o' I want this to be returned:
[65,66]
Because the 65 & 66 has 'o' inside their values