Hi,
In a previous JSON feed, I am passing through a market id on click to the below function. I then run another JSON feed within the below function, but I am trying to place the getmarketid var within one of the appending .html JSON div tags below to pull the data from the JSON feed. I don't have the correct syntax I believe but I am not sure how to correct the syntax :(
Any help please?
function marketview(marketid,marketname){
var getmarketid = marketid;
if(getmarketid!=null){
$.getJSON('http://local/markets/json/lhm-test.js', function (data) {
$("div#marketheader_json").html(data.'+getmarketid+'.marketname);
$("div#marketview_json").html(data.getmarketid.marketid);
});
}else{
$("div#marketview_json").html('BLAH');
}
}