0

enter image description here My Schema and data is shown above. How can I query in Mongoose for all documents where within optedOutPerson where campaign_id contains 6020?

In MongoHub, I'm trying: { 'optedOutPerson.campaign_id': /602/ } and that yields no results.

Thank you, in advance.

1 Answer 1

1

Seems you are storing the campaign id as a ObjectID, try convert to string

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.