I have json that looks like the following although this is only the beginning of it, not the whole lot.
{"ns1:AmplifyResponse":{"AmplifyReturn":{"Topics":{"Domains":null,"TopTopics":[{"Topic":{"Name":"loo","Value":5.00},"
I am doing this jquery ajax call to get it, again its trimmed:
$.ajax ({
type: "POST",
url: 'ajax/openampcheck.php',
dataType: 'json',
async: true,
data: {"inputtext": inputmaintext},
success: function(msg){
$('#oaresult').html(msg.ns1:AmplifyResponse.AmplifyReturn.Topics.TopTopics[1].Topic.Name);
....
in Chrome console this given me an error… Uncaught SyntaxError: Unexpected token .
for the last line, which seems to be something to do with the colon here …
ns1:AmplifyResponse
if i wrap it in quotes though, i.e.
$('#oaresult').html(msg."ns1:AmplifyResponse".AmplifyReturn.Topics.TopTopics[1].Topic.Name);
i then get this error:
Uncaught SyntaxError: Unexpected identifier
How should I fix it?
or