Anyone have idea how to export distinct column value on mongodb using mongoexport command.
Command: db.coll.distinct("uid");
The solution i have tried is :
mongoexport --csv -d db -c collection -q '{distinct: "collection", "key": "uid"}' -f "uid" -o distinctUid.csv