I am having a hard time understanding the $.getJSON
.
I have a url and I want to make a function for example fetch(url)
where I use $.getJSON
to fetch a string and parse it.
The response of the url is in this form:
{
"status": "Unknown",
"additionalStatus": "None",
"emailAddressProvided": "test@tester.com",
"emailAddressChecked": "test@tester.com",
"emailAddressSuggestion": ""
}
I want the function to return a var data
where
data.status = Unknown
data.additionalStatus = None
.
.
... and so on.
Thank you!