Basically, it works like this:
Make your REST call to get search results from SharePoint Create an instance of the S43.SearchResultParser object
Take the parameter returned from SharePoint and pass it to the parseResults method in the SPRESTSearchParser object
The return value from that method call is a JSON object which contains an array of SearchResult objects. Each SearchResult object is simply a representation of a single result from SharePoint that is easier to work with than the raw results.
Each property from the result set is available directly on the SearchResult object within the array by name – much easier than remembering the position of each property in the result set. Right now the following properties are available from the PrimaryQueryResult.RelevantResults collection:
In the future, I’d like to clean this up and expand it to make use of additional result sets and other search capabilities. Feel free to fork the code and adapt to meet your needs. If you do something interesting, please submit a pull request to allow others to take advantage of it as well.