Imagine we have an object that contains information about fruit quantities in different batches:
"fruit_quantities" : {
"batch1": {
mango : 100,
apple: 50
},
"batch2": {
mango : 0,
apple: 50
},
"batch3": {
mango : 0,
apple: 50
}
}
I am interested in checking if the value of mango
is greater than 0, regardless of the batch it is in. How can I achieve this using JavaScript?