I'm currently attempting to parse a JSON file from an online source. Feel free to check out the link yourself. Unfortunately, no matter what I try, I keep getting 'undefined' when trying to access the data. All I want is some kind of output from this JSON file. Specifically, I'm struggling to retrieve the list of names ('nm') in the file. Despite my efforts, it consistently returns undefined.
$.ajax(
{
type: 'GET',
url: 'http://mysafeinfo.com/api/data?list=englishmonarchs&format=json',
contentType: "application/json; charset=utf-8",
dataType: "json",
async: false,
success: function(r)
{
alert(r.example);
}
});