src code

instance method Spah.SpahQL.QueryResultSet#map

Spah.SpahQL.QueryResultSet#map(callback) → Array
  • callback (Function) – A callback to execute against each result in the set. The callback will receive the arguments (result, index, total), within the function, the this keyword will refer to the QueryResult for this iteration.

Executes the callback function with each item in this resultset. The return value from each iteration of the callback is appended to an array, which is returned at the end of the loop.