I'm looking to make a perfect match between users using mongoose.
Here is an example of a schema:
username: "Nicolas",
fruitiwant:["apple", "orange"]
fruitihave: ["banana"]
I want to have a json that displays users who have a perfect match. User A wants the fruit that user B has. User B wants the fruit that user A has.
Thanks for your answers.