I can not work out the javascript syntax to access elements of the following, which has been stringify'd after being returned as JSON from php/mysql.
vehs contains
[[{"vehID":"8","vehGrpType":"CAR","vehSubGrp":"Alfa Romeo","vehTitle":"Alfa Romeo 6C","vehPeriod":"","vehDescrip":"","vehNotes":"","vehGallery":"0","vehGallPath":"","vehGallImgs":""}],[{"vehID":"9","vehGrpType":"CAR","vehSubGrp":"Alfa Romeo","vehTitle":"Alfa Romeo 75 (1985-92)","vehPeriod":"","vehDescrip":"","vehNotes":"","vehGallery":"0","vehGallPath":"","vehGallImgs":""}],[{"vehID":"10","vehGrpType":"CAR","vehSubGrp":"Alfa Romeo","vehTitle":"Alfa Romeo GTV (1995-2000) and Spider (1995-2006)","vehPeriod":"","vehDescrip":"","vehNotes":"","vehGallery":"0","vehGallPath":"","vehGallImgs":""}]]
I am trying
for (var veh in vehs) {
$('#selectDIV').append(veh['vehTitle'] + '<br>');
}
But all I get is the numerics 0, 1 and 2, which I assume are the indexes of the three entries.
I have misunderstood something along the way, about associative arrays within array elements. So I am a bit stuck and am not knowledgeable enough to know what combination to try next.
Any help appreciated, as I am sure it is very straightforward.
Thanks