MongoDB.live, free & fully virtual. June 9th - 10th. Register Now MongoDB.live, free & fully virtual. June 9th - 10th. Register Now

MongoDB Compass missing aggregation options

Hallo,
Does anyone know why the MongoDB Compass do not have the possibility to use the $objectToArray ($objectToArray (aggregation)) feature on his aggregation creating window. Does the MongoDB Compass not support all aggregation features?

The $objectToArray aggregation operator works fine in the Compass (I am using version 1.21.2). Note that it not an aggregation stage, it is an operator which is used within another stage, like $project.

For example using the input document of test collection: { obj: { str: "foo", num: 99 } }

The aggregation query:

db.test.aggregate( [ { $project: { obj_to_arr: { $objectToArray: "$obj" } } } ] )

The screenshot showing the same using Compass:

2 Likes

Oh this was the problem thank you for the explanation

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.