I’m not able to find anything in the documentation related with population using the Data API from Mongo Atlas.
I’m doing something like this, but not working:
const body = JSON.stringify({
...connectionData,
filter: {
status: true,
catalog: true,
slug,
},
populate: 'taxes',
collection: 'products',
projection,
});
Jason_Tran
(Jason Tran)
January 23, 2024, 3:11am
2
Hi @Andres_Filoso - Welcome to the community.
Just to clarify, are you referring to just inserting data into a collection? Maybe the Data API examples for inserting a document may help.
Regards,
Jason
Hi @Jason_Tran .
No. Actually, I was looking to use $lookup to “populate” documents from another collection. I was able to accomplish this by using the pipeline field and removing the filter and projection fields.
https://www.mongodb.com/docs/atlas/app-services/data-api/openapi/#operation/aggregate
Also here is an example of how to use it.
Thank you!
1 Like
system
(system)
Closed
January 29, 2024, 4:45pm
4
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.