Jquery ajax request - datafilter problem

Hello,

I’m trying to set up jquery ajax request which would preprocess the returned data before decoding it to json.

The data that is return is metatype script, I want to strip out the function call and just use the json array (argument):

window.google.ac.h(["test",[["test","","0"],["test internet speed","","1"],["testosterone","","2"],["testament","","3"],["test my speed","","4"],["test flash","","5"],["testicular cancer","","6"],["testmasters","","7"],["testudo","","8"],["testing","","9"]],"","","","","",{}])

http://clients1.google.com/complete/search?q=test

Heres my current code:

	$.ajax({
	  url: 'http://clients1.google.com/complete/search?q=test',
	  dataType: 'script',
	  success: function(data) {
	    alert('Load was performed.');
		alert(data); //will show empty string
	  },
	  dataFilter: function(data, dataType) {
		alert('data filter');
		return data;
	  }

	});

The code wont show the alert “data filter”.

Any ideas what am I doing wrong?

How can I get the string, to be transformed to json object?
Should data which is passed to success and dataFilter function be string or an object?
The documentation says that script metatype is executed, which I don’t want.

Also, what do you use for debugging? I use firebug (i know for console.log function) but I somehow prefer alert thing. How do you debug your codes?

Thanks a lot for help.

The datatype is set to script, so the data is first evaluated as if it were a script, and the result after being evaluated is then passed to the success function.

Could it be the script datatype and a potentially unsupported window.google.ac.h method that is getting in the way?