Questions tagged [jmespath]

JMESPath (JSON Matching Expression paths) is a query language for JSON. JMESPath allows you to extract elements from a JSON document. It also allows you to directly transform the queried elements.

JMESPath (JSON Matching Expression Paths) is a query language for .

In addition to allowing you to extract elements from a JSON document, it also allows you to transform the queried elements.

In other words: JMESPath is to JSON what is to .

For questions about JSON itself, please use the tag.

Useful Links:

495 questions
0
votes
1 answer

How Pass parameters to JMES path expression in python

Python code. How to pass parameters to JMESpath instead of hardcoding? ext= '.md' filtered_iterator = page_iterator.search("Contents[?ends_with(Key, `.md`)].Key") I would like to pass ext paramters in the contents path in the place of .md. What…
0
votes
2 answers

Using JMESPath and aws ec2 describe instances to output multiple tag values

I'm trying to output multiple tags from an ec2 instances description. The tag values that I want are Name and aws:autoscaling:groupName. "Tags": [ { "Value": "somename", …
0
votes
1 answer

Azure CLI jmespath query

For the JSON below, I’m trying to get the list of locations for a specific resourceType. This command: az provider list --query "[?namespace=='Microsoft.Compute']" gives me the example output (too much to include all) at the end. How do I then…
Adoyt
  • 395
  • 2
  • 4
  • 17
0
votes
1 answer

How to compare with the current node in JmesPath?

I have a JSON blob from Amazon's AWS describing a whole lot of load balancers. I would like to extract the names of all the load balancers on a certain subnet. I use Ansible so the language of choice for selecting bits of JSON is JmesPath. Do you…
Max Murphy
  • 1,701
  • 1
  • 19
  • 29
0
votes
1 answer

Is there a JMESPath Terminal for windows 10?

I have installed python 3.5.2 on my windows 10 machine. I also installed JMESPath Terminal by using following command on windows command line: pip install jmespath-terminal Everything went smooth and it was successfully installed. But when I type…
Raghu
  • 2,859
  • 4
  • 33
  • 65
-1
votes
1 answer

How to extract values using JSON JMESPath extractor ignoring space in JMETER

I am new to JMETER, and I am facing problem while extracting values using JASON JMESPath extractor post processor, my response body is [ { "myid_K": "#0021", "myaddres": null, "myAddress_K": "", } ] In my response…
Chetan
  • 1
-1
votes
1 answer

AWS CLI JMESPath Query to get details of get-execution-history using --query option

I am trying to execute below cli command to get the execution details of the stepfunction aws stepfunctions get-execution-history --execution-arn --no-paginate --output json --query 'events[*].executionStartedEventDetails.input' and above…
SwapnilM
  • 155
  • 2
  • 6
  • 16
-1
votes
1 answer

How to turn a column into a row via JMESPath in Google sheets?

Good afternoon! I am working on api integration with google sheets using the API to Sheets extension https://workspace.google.com/marketplace/app/api_to_sheets/245778206812. Can't solve JMESPath Query problem, need your help Initial code { …
-1
votes
1 answer

Get value from json with Jmespath - Python

I'm trying get all values where "_tradeIdScheme": "mhi:MUREX". e.g. "#value": "37066751" Part of JSON: "trade": { "tradeHeader": { "partyTradeIdentifier": [{ "tradeId": [{ "#value":…
Bruno Lorena
  • 73
  • 1
  • 9
-1
votes
1 answer

How to get nested value from list

I'm having trouble to get ID from json code that mutch a specific value in such array I explain: I have this code json: { "results": [ { "TAB": "bleu", "exp": [ { "A": "NOT_PROTECTED", "B": [ …
-1
votes
1 answer

Ansible json_query fail to search when json string convert to lower

i try to search string in json , all working great is the search term is used with exact case but i like to make the search case insensitive where i don't know in which case the given json will be : so this is my playbook see the "lower"…
user63898
  • 29,839
  • 85
  • 272
  • 514
-1
votes
1 answer

JSON query expression (JMESPath) to remove a key/value from a nested list of dictionaries

I have the below data structure in JSON, which is a dictionary where each element is a list of dictionaries. { "383e36d1-32e5-4705-8271-fa5e9e2ad538": [ { "label": "blah", "group_label": "group_a", "id":…
-1
votes
2 answers

Ansible: Looking for a known key with a known value at an arbitrary depth using json_query?

Is it possible to accomplish something like this using json_query? I wasn't able to find anything after quite a bit of searching (neither with json_query nor with jmespath). Everything I was able to find assumed that the structure of the dict/json…
OL83
  • 3
  • 3
-2
votes
1 answer

Using python variables in jmespath.search

I am working on a script to query instances not running an AMI. Below query works print(jmespath.search( "Reservations[].Instances[?ImageId != `ami-056c679fab9e48d8a`].{ InstanceName: Tags[?Key == `Name`]|[0].Value, ImageId: ImageId,…
Raj
  • 55
  • 1
  • 9
-2
votes
1 answer

What the syntax would be to pull the "members" value out of this JSON where the name value is "PROD_poolgroup"

What the syntax would be to pull the "members" value out of this JSON where the name value is "PROD_poolgroup". I think it should be [?config.name == "PROD_poolgroup"].config.members I've tried other variations without success also. "all_members":…
ScottO
  • 27
  • 1
1 2 3
32
33