Imran khan
Imran khan

Reputation: 857

mongoexport using different collection in query

Is there any option in mongoexport to use the query on different collection

mongoexport --host=“xxx:1111” --db=dbname --pretty --collection=employee --query=‘db.department.find({“departmentId”:10},{“employeeID”:1})’ --out=output.json

I want to get the employee records based on the department collection All the employee , those who belong to deparmentID : 10

Db version details
db.version();
4.2.8

Upvotes: 0

Views: 28

Answers (0)

Related Questions