Assuming this is a global function (it shouldn't be):
window[json.callback](json);
If your code is well structured, you will likely have an object containing all the functions that JSON can call.
var myObject = { func1: function myObject_func1_method(foo) { return 1; }, func2: function myObject_func2_method(foo) { return 2; } }
Then you can:
myObject[json.callback](json);
source share