Does anyone know if there's a way to use a reference to a string in a mongo query, instead of using the string directly in it?
i.e. I want to do this:
key = "id";
value = "12345";
collection("accounts").find({key: value});
Instead of this:
collection("accounts").find({"id": "12345"});