so i have stored a JSON in a varible but how do I search it, basiclly when a user clicks the name of the business I want to load and show them the store address, phone number and other details.
here is the var
var myMarkers = {
"markers": [
{
"id": 1,
"name": "Belconnen",
"url_name": "belconnen",
"address": "Shop 176, 3rd Floor, Westfield Shopping Centre, Benjamin Way",
"suburb": "Belconnen",
"state": "act",
"postcode": 2618,
"country": "Australia",
"phone": "(02) 6251 1838",
"fax": "",
"photo": "dcddfcb5c806b2255c611bd2d108cead.JPG",
"text": "",
"display": 1,
"lat": -35.238428606,
"lng": 149.065917134,
"email": "[email protected]",
"dealer_code": 63014,
"region_id": 3,
"type": 4
}
]
I have removed most of the JS for easy.
This is the first time I have every tried to search and store the JS, normally i would get PHP to do it, but thought be easier and faster to get JS.