JMESPath query when JSON property names have spaces
See original GitHub issueDescription
Outline the issue here: In JMESpath.org website, I’m able to run the following query:
Here, there’s a space in one of the JSON names “d e”. This works in JMESPath website, but a similar thing fails in CLI.
Environment summary
Install Method: How did you install the CLI? (e.g. pip, interactive script, apt-get, Docker, MSI, nightly)
Answer here: Developer setup
CLI Version: What version of the CLI and modules are installed? (Use az --version
)
Answer here:
azure-cli (2.0.10+dev)
acr (2.0.8+dev) acs (2.0.10+dev) appservice (0.1.10+dev) backup (1.0.0+dev) batch (3.0.3+dev) billing (0.1.3+dev) cdn (0.0.6+dev) cloud (2.0.6+dev) cognitiveservices (0.1.6+dev) component (2.0.6+dev) configure (2.0.10+dev) consumption (0.1.3+dev) core (2.0.11+dev) cosmosdb (0.1.10+dev) dla (0.0.10+dev) dls (0.0.10+dev) feedback (2.0.6+dev) find (0.2.6+dev) interactive (0.3.6+dev) iot (0.1.9+dev) keyvault (2.0.8+dev) lab (0.0.8+dev) monitor (0.0.8+dev) network (2.0.10+dev) nspkg (3.0.1+dev) profile (2.0.8+dev) rdbms (0.0.5+dev) redis (0.2.7+dev) resource (2.0.10+dev) role (2.0.8+dev) sf (1.0.5+dev) sql (2.0.7+dev) storage (2.0.10+dev) taskhelp (0.1.5+dev) testsdk (0.1.0+dev) utility-automation (0.1.1) vm (2.0.10+dev)
Python (Windows) 3.5.3 (v3.5.3:1880cb95a742, Jan 16 2017, 16:02:32) [MSC v.1900 64 bit (AMD64)]
Python location ‘d:\MabOneSdk\azure-cli\env\Scripts\python.exe’
OS Version: What OS and version are you using?
Answer here:
Windows 10 Anniversary Edition
Shell Type: What shell are you using? (e.g. bash, cmd.exe, Bash on Windows)
Answer here:
cmd.exe
Issue Analytics
- State:
- Created 6 years ago
- Comments:14 (10 by maintainers)
Top GitHub Comments
@intlabs, what @johanste provides is correct.
To filter on subscription name, you will need to use Raw String Literals which are surrounded by single quotes (
'
).On the other hand, double quotes (
"
) are for Identifiers, like:Does
solve your problem?