I need to load the data by joining two id
In a form, I populate my client with an ID. In another form I fill in other information and load the customer ID. That is, both forms send the same ID to the bank.
I need to generate a json that has the information for these two forms.
When I do:
Contact.findOne({$and: [{_id: contact.Client.id}, {_id: client.id}]},function(err, contacts) {
does not work.