So I have an object like this:
{
"apples": [
"one",
"two"
],
"oranges": [
"three",
"four"
]
}
How do I look through this object and find four
for example? Something like:
for (var i=0; i < obj.length; i++) {
for (var y=0; y <obj.childObj.length; y++ {
obj.childObj[i] === 'four' ? return : null;
}
}
Or is there a better way to structure this data?