How one is supposed to query nested properties wit...
# general
f
How one is supposed to query nested properties with the CLI in a stack output ? I have an output like:
Copy code
OUTPUT           VALUE
componentProps   {"foo": "something", "bar": "whatever", ...}
And I want to get it like
pulumi stack output componentProps.foo
or
pulumi stack output componentProps:foo
but didn’t find the right way to do it. Obviously I can do a
pulumi stack output componentProps | jq -r '.foo'
but I was wondering if there was a “native” way in
pulumi
CLI to do it (and avoid the
jq
dependency)
w
Currently we suggest composing with tools like
jq
. I can imagine possibly adding native jmespath support (like the AWS CLI
—query
param) in the future to all commands that support JSON output.
👍 1