Skip to content
This repository was archived by the owner on May 1, 2025. It is now read-only.

Commit be0cdba

Browse files
author
Hans Kristian Flaatten
committed
Enhance qs.parse documentation
1 parent 7e42a4b commit be0cdba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ Params is an object with URI query params and their values. Ex. `req.params`
7171
if you are working with ExpressJS.
7272

7373
```javascript
74-
collection.find(qs.parse(params), field).toArray(function(err, documents) {
74+
var query = qs.parse(req.params);
75+
mongo.collection('mycol').find(query, field).toArray(function(err, documents) {
7576
// matching documents
7677
});
7778
```

0 commit comments

Comments
 (0)