SPlus.Search.queryWithOptions (url, options, function (resources){
for (var i=0; i < resources.length; i++) {//Loop the resources Array
var resource = resources [i];//Getting a JSON object with the requested fields
var title = resource['title']; //Getting one of the fields
var properties = resource['properties']; //Getting the properties array
for (var i=0; i < properties.length; i++){
}
//TODO: Implement what to do with each resource and its properties
}
}, function (errorResponse){
var error = errorResponse['error#displayValue']; //Getting the error
//TODO: Implement how to handle errors
}, function (cancelResponse){
//TODO: Implement how to handle a user’s cancel
});