function (data) {
//add values based on activity type
//data = JSON.parse(data);
//alert(abc.Phone1);
alert(data.myName)
alert(data.toString());
if (activityType == "Phone") {
}
return;
},
As you can see this callback function of $.ajax
taking JSON
data from controller.
For example:
[{"name":"myName" ,"address": "myAddress" }]
In this case my first alert giving me undefined and second/third alert popup comes up with:
[{"name":"myName" ,"address": "myAddress" }]
How can I access value by name so that my first alert filled out with myName
which is value of name
?