I want to search if there is an object with _id containing a string. For example:
I want to use the string '00d0' to find the object with _id 5af61cc9e4e6d552d70900d0, wich ends with '00d0'
However, 5af61cc9e4e6d552d70900d0 is an ObjectId, and mongoose gives me a 501 when I do this:
Object.find({ _id: { $regex: '00d0', $options: 'i' } })
How should I modify this search query to get it work? Thanks