SPlus.Search.query (url, text, 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 one of the resource’s properties
}
//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
});