In an array of objects, I want to find all objects that has a certain key-value pair and store them all in a different variable.
const productSchema = new Schema(
{
variants: [
{
attrs: {},
},
],
},
{ minimize: false, timestamps: true }
);