I have a script that outputs a json string via json_encode in PHP. The json string consists of
[{"custId":"2","custName":"John Inc"}]
The PHP script is initiated using
$.getJSON("customer.php", function(data){alert(data + ' ' + data.custName);});
The response is -
[object Object] undefined
Javascript recognises 'data' as an object but I cannot seem to reference the information using json dotted notation.