I have the following payload (small sample) being returned from an api as an Object.
{
"0hmITkwFMbB2BDIUFlFm": {
"price": 89,
"categories": ["wireless", "broadband"],
"companyname": "T-Mobile",
"symbol": "TMUS"
},
"8g570i57at8yTjoZtSuk": {
"companyname": "Microsoft",
"symbol": "MSFT",
"price": 181.25,
"categories": ["technology", "software"]
},
"OMc8V4AVH5q5z0Sis8vp": {
"companyname": "Amazon",
"symbol": "AMZN",
"price": 2419.49,
"categories": ["E-commerce", "consumer products"]
},
I want to be able to return each object that includes a given value in the categories array. For example, returning all object that includes "technology" in the categories array.
How can I do this in javascript?