This question already has an answer here:
- Check that Field Exists with MongoDB 4 answers
I am trying to figure out how to match a key and return all the values for that key. Is it possible to give the value as a wildcard? I want to return everything for that specific key using wildcard on the value.
db.collection.find({"key" :"*"})
Also I was hoping this would return the entire collection as well that had the key with the wildcard value match as well.