I'm having trouble printing an object with a variable name. It works when I hard code it.
var objectVarName = "lat";
var obj = jQuery.parseJSON(JSON.stringify(msg));
// {"lat":"93"} is what JSON.stringify(msg) prints
$('#display').prepend("<br/><br/>" + JSON.stringify(msg));
//obj['lat'] works, obj[objectVarName] does not
$('#display').prepend("<br/><br/>" + obj['lat']);