Skip to content

Commit 2d756cb

Browse files
authored
docs: add instruction to query objects with npm view (#5527)
* add instruction to query objects with npm view * fix package version in example command in npm-view docs
1 parent a1ef180 commit 2d756cb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/content/commands/npm-view.md

+6
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ contributor in the list, you can run:
7272
npm view express contributors[0].email
7373
```
7474

75+
If the field value you are querying for is a property of an object, you should run:
76+
77+
```bash
78+
npm view express time'[4.8.0]'
79+
```
80+
7581
Multiple fields may be specified, and will be printed one after another.
7682
For example, to get all the contributor names and email addresses, you
7783
can do this:

0 commit comments

Comments
 (0)