Best way to return a nested object the matches a property requested

I’m trying to create a new object that only contains the a product array with the seller I req. I have an order object that has a product array. I’d like to return a specific seller. I tried:

const newOrders = orders.map((element) => {
        return {
          ...element,
          product: element.product.filter(
            (seller) => seller === req.currentUser!.id
          ),
        };
      });

does mongoose have a preferred method for doing what I bring to achieve? I’ve read through the find queries but none of the methods seem useful to this use case.

orders: [

{
userId: "638795ad742ef7a17e258693",
status: "pending",
shippingInfo: {
line1: "599 East Liberty Street",
line2: null,
city: "Toronto",
country: "CA",
postal_code: "M7K 8P3",
state: "MT"
},
product: [
{
title: "new image",
description: "a log description",
seller: "6369589f375b5196f62e3675",
__v: 1,
id: "63737e4b0adf387c5e863d33"
},
{
title: "Mekks",
description: "Ple",
seller: "6369589f375b5196f62e3675",
__v: 1,
id: "6376706808cf1adafd5af32f"
},
{
title: "Meeks Prodyuct",
description: "long description",
seller: "63868795a6196afbc3677cfe",
__v: 1,
id: "63868812a6196afbc3677d06"
}
],
version: 1,
id: "6388138170892249e01bdcba"
}
],

or is this something that better handled in the frontend when I post the data? I was thinking a for loop would give me the de