mingo-app / mingo

Found a bug? have a FR ?
59 stars 3 forks source link

[FR] Aggregate $objectToArray #577

Closed BronzorX closed 1 year ago

BronzorX commented 1 year ago

There's no possible to insert a stage with the function "$objectToArray"

tothradoslav commented 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" } }}]

tothradoslav commented 1 year ago

While at it, I checked the current list of supported aggregation stages and added the missing (new) ones.