I have an object like so:
var products = {"products":[
{"productID":"32652", "name":"Playstation 4", "price":"109.99"},
{"productID":"24164", "name":"Xbox", "price":"129.99"}
]};
I need to search with the variable productID
and find the associated name
and price
My searches have just led me off track with things like .closest
which is for the DOM not for an object.
How can I search the object for the productID
var and find the associated data?