Is it possible in MongoDB to pass several variables in one query and use several database searches?
Example in Neo4j - finding the first person, and then finding results based on the first search:
MATCH (n {name: 'Anders'})--(m)
WITH m
ORDER BY m.name DESC
LIMIT 1
MATCH (m)--(o)
RETURN o.name
Is it possible to get something similar in MongoDB?
At the moment I have an idea only to make two separate queries. If this is the only solution, how should it be done to optimally transfer this data between queries? I am using the mongodb driver on nodejs.