My ajax code is
$.ajax({
type: \'GET\',
dataType: \"jsonp\",
processData: false,
crossDomain: true,
jsonp: false,
url: \"http://someo
You just have to parse the string using JSON.parse like this :
var json_result = {"AuthenticateUserResult":"{\"PKPersonId\":1234,\"Salutation\":null,\"FirstName\":\"Miqdad\",\"LastName\":\"Kumar\",\"Designation\":null,\"Profile\":\"\",\"PhotoPath\":\"\/UploadFiles\/\"}"};
var parsed = JSON.parse(json_result.AuthenticateUserResult);
console.log(parsed);
Here you will have something like this :
Designation
null
FirstName
"Miqdad"
LastName
"Kumar"
PKPersonId
1234
PhotoPath
"/UploadFiles/"
Profile
""
Salutation
null
And for the request, don't forget to set dataType:'jsonp' and to add a file in the root directory of your site called crossdomain.xml and containing :
EDIT to take care of Sanjay Kumar POST
So you can set the callback function to be called in the JSONP using jsonpCallback!
$.Ajax({
jsonpCallback : 'your_function_name',
//OR with anonymous function
jsonpCallback : function(data) {
//do stuff
},
...
});