I have a WCF service that returns a record from my database..I get the value from my WCF using an ajax call to it and get it as an JSON object..
The below image shows the response object in my browser..

That is fine..but when i want to give it using an alert like
alert(myData.version);
I could not get the values of it.. How do i get the values from my response ??
MY AJAX CALL :
$.ajax({
url: urlToHandler,
type: 'POST',
data:{},
dataType:'json',
contentType: 'application/json',
success: function(data) {
myData = ((data.GetUpdateVersionResult), function (key, value) {
var type;
if (value && typeof value === 'object') {
type = value.type;
if (typeof type === 'string' && typeof window[type] === 'function') {
return new (window[type])(value);
}
}
return value;
});
alert(myData[0].version);
},
error: function(data, status, jqXHR) {
alert('There was an error.');
}
}); // end $.ajax
}
The info you are looking for is in
data.