Can't find a the correct workflow to get the following from looping thro array:
- loop thro all the objects within the array and find a specific
warehousevalue - if the value exists in any object, use that object which holds the specific
warehousevalue and return apricevalue within it
For example: If I would do a search for 1374610389 warehouse value I would get returned price of 78.00
var test = [
{
lorem: "ipsum",
dolor: "sit",
price: "10.00",
warehouse: 1157964289
},
{
lorem: "ipsum",
dolor: "sit",
price: "22.00",
warehouse: 1269753487
},
{
lorem: "ipsum",
dolor: "sit",
price: "78.00",
warehouse: 1374610389
},
{
lorem: "ipsum",
dolor: "sit",
price: "32.00",
warehouse: 1674985630
},
{
lorem: "ipsum",
dolor: "sit",
price: "16.00",
warehouse: 1847893458
}
]