$.getJSON(
"test.php",
function(data){
... code should be here?
}
)
data contains this code:
{
"name": "Mary",
"surname": "Carey"
}
I want to create these variables:
theName = name from json;
theSurname = surname from json;
What is a true syntax for this task?
Thanks.
theName = data.name; theSurname = data.surname;