Ideally you want to include example documents (formatted with the buttons available in the editor) as well as sample output so that people can help you by putting the data straight into something like mongo playground.

In the mean time, it looks like you have already read the user record and have the favourite article array element and want to pass that to the Articles collection to filter.

You could do this with the $in operator:

If using a find operation, you can add a project to it to filter out the fields you want to return, or if using an aggregation use a $project to limit the fields returned.

1 Like