I\'m trying to output a correctly wrapped JSONP value for jQuery to consume.
The output I\'m looking for is:
jsoncallback({\"Status\": \"OK\"})
You need to eval the output from your WCF call. See this fiddle.
You're getting a string back from your WCF call. You essentially need to compile it and then execute it.
Here's the code from the fiddle:
function jsonCallback(obj){
alert(obj.Status);
}
$(document).ready(function(){
var js = "jsonCallback({'Status':'OK'})";
eval(js);
});
The js variable is your output from the WCF call. As soon as I eval it, it will compile and execute.