I have a document similar to the following, where I want to return a field of the current top level documents as the top level document itself in the results array:
{
field1:{contents:{}}
field2:{othercontent:{}}
}
I want the results of my aggregation query to return the following
{
contents:{}
}
Can this be done with $project and the aggregation framework?