mongodb select document code example Example 1: mongodb get all rows db.collectionName.find() Example 2: query mongodb db.inventory.find( { status: "D" } )