How do I parse a perfectly formed .getJSON result
Hello,
Still new to the JSON scene, and clueless about what to do with the result of a well-formed JSON result from the server.
$.getJSON('../xmpx/formdev.cgi', $('#contact').serialize(),
function(result) {
console.log(result) shows:;
[{"errors":[{"name":"cannot be blank"},
{"email":"address does not appear to be valid or is blank."},
{"name":"cannot be blank"}]}]
I would like to have access to the errors array, having the key and value for each.
console.log(result.errors) is empty.
Where can get a leg up on this whole JSON thing (have been to the JSON.org site and tried the parser, but to no avail).
Thanks!