Lets say I have an array of objects:
inventory = [{name:'milk',price:4},{name:'apple',price:2}]
How could I reference the entire object that contains inventory.name = 'milk' or inventory.price = 4?
I need to reference it in order to return its index inside of the outer array.