Closed BronzorX closed 1 year ago
$objectToArray is an operator, not an aggregation stage. You can use it inside an aggregation stage, for example:
[{$project: { item: 1, dimensions: { $objectToArray: "$dimensions" } }}]
While at it, I checked the current list of supported aggregation stages and added the missing (new) ones.
There's no possible to insert a stage with the function "$objectToArray"