So for examples instead of:
var queryTask = new QueryTask("http://arcgis/rest/services/live/SEARCH/MapServer/15"); var query = new Query(); query.returnGeometry = false; query.outFields = [ "NAME" ]; ];
I would do this:
var queryTask = new QueryTask(jsonString); var query = new Query(); query.returnGeometry = false; query.outFields = [ "NAME" ]; ];
I can't seem to find any examples of it and just wondered if it's possible?
Thanks
Depends on what do you expect there to be in the jsonString. I assume you are thinking about a serialized feature set? If so then the answer is 'no'.
The query actually needs to be passed on to arcgis server backend that runs the query operation for specified input conditions. Then returns the result to the client.