Libmongoc and Aggreagation

Narit_B
Sun, 06 Mar 2022 19:28:08 +0000

I’m trying to use $arrayToObject Aggregation command in Libmongoc, can anyone show the example, function to be called for this command.

Or, is there any way to insert/update the object in the object? without expanding to array? I want to maintain mapping mechanism of the data.
For Ex,
{
_id:ObjectId(“123456789”),
foo: { a:1}
}
into
{
_id:ObjectId(“123456789”),
foo: { a:1,b:2,c:3},
}

Read full topic