mapReduce() public method
Performs MongoDB "map-reduce" command.
public string|array mapReduce ( $collectionName, $map, $reduce, $out, $condition = [], $options = [] )$collectionName string
Collection name. $map \MongoDB\BSON\Javascript|string
Function, which emits map data from collection. Argument will be automatically cast to \MongoDB\BSON\Javascript. $reduce \MongoDB\BSON\Javascript|string
Function that takes two arguments (the map key and the map values) and does the aggregati