From 2d756cbb05125dcb769f2ca4c1687e42568d5882 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Kurowski?= Date: Thu, 22 Sep 2022 02:51:46 +0200 Subject: [PATCH] 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 --- docs/content/commands/npm-view.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/content/commands/npm-view.md b/docs/content/commands/npm-view.md index d9d1daac0cda7..9e07619c204cf 100644 --- a/docs/content/commands/npm-view.md +++ b/docs/content/commands/npm-view.md @@ -72,6 +72,12 @@ contributor in the list, you can run: npm view express contributors[0].email ``` +If the field value you are querying for is a property of an object, you should run: + +```bash +npm view express time'[4.8.0]' +``` + Multiple fields may be specified, and will be printed one after another. For example, to get all the contributor names and email addresses, you can do this: