I have a collection in mongo which has name and count fields.
{name:'myName',count:5}
Is it possible to sort data by count and export as json using mongoexport?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Actually you can, but you have to use special params. Here’s a sample (redirecting to file):
The $query part is not strictly necessary, but I included it because of this bug on GitHub (fixed now, but only just).