Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save vunb/8878664e790d9c01ce9a8630a57398fe to your computer and use it in GitHub Desktop.

Select an option

Save vunb/8878664e790d9c01ce9a8630a57398fe to your computer and use it in GitHub Desktop.

Revisions

  1. vunb created this gist May 25, 2018.
    10 changes: 10 additions & 0 deletions mongodb-data-query-by-filter-string-field.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    # Query mongodb by filtering string fields with comparation and convert its data to CSV format using RoboMongo

    Ref: https://github.com/Studio3T/robomongo/wiki/How-to-export-to-CSV

    ```js
    db.getCollection('hsdt').find({ma: {
    $gte: "1700004001",
    $lte: "1010005000"
    }}).toCSV()
    ```