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

Jmeter JMESPath extraction with Partial text or contains filter

Hello can someone help me simulate this scenario. Because I want to use contains or Partial text on my filter using JMESPath extractor on Jmeter. Sample Response: [{ "orgName": "MNL_Automation", "name": "Test-123", "agentMap":…
Ralph
  • 105
  • 7
0
votes
3 answers

Jmeter JMESPath Extract and converting to an Array

Hi is there's a way I can simulate this scenario using JSONPath? Example I have multiple City value and I want all to extract and put it on an Array. Your response is highly appreciated. Thank you so much. [ { "id": "MAIN", "key": 1 }, { "city":…
Ralph
  • 105
  • 7
0
votes
1 answer

Is it possible to read all values in the form JSON JMESPath extractor that matches a regular expression in jmeter?

I have following as a response from a GET call and I need to use the values like 100, 101, 102, etc in the payload of another POST call. Response: {"id":12,"records":[{"id":100,"documentId":1, "pageNo":1},{"id":101,"documentId":2,…
Priyesh
  • 131
  • 1
  • 1
  • 12
0
votes
1 answer

How to add & condition for jmespath query with az command

I want to filter out two types in the query expression Json file : [ { "name": "name0", "tags": { "env": "dev" }, "type": "Microsoft.OperationsManagement/solutions" }, { "name": "name1", "tags": { "env":…
Uday Kiran
  • 487
  • 2
  • 9
  • 29
0
votes
2 answers

How to cross reference a property in JMESPath or JSONPath?

I am trying to use jmespath for my querying my json and I am trying to access a property which is at a higher level. Below is my JSON: { "properties": { "DefaultVMTypeID": "RT", "VM": { "measurements": [ …
Ankit Tanna
  • 1,779
  • 8
  • 32
  • 59
0
votes
1 answer

How to remove duplicates in the az command output using --query

Command az resource list --resource-group MYRG --query "[].{type:type}" output [ { "type": "Microsoft.Network/networkInterfaces" }, { "type": "Microsoft.Network/networkInterfaces" }, { "type": "Microsoft.Network/networkSecurityGroups" }, { "type":…
Uday Kiran
  • 487
  • 2
  • 9
  • 29
0
votes
1 answer

Ansible - issue with loop and json_query's

Question I need to get the ID from the GET because it's needed in the URL in the PUT task to edit a specific "input" entry. I'm using the Ansible URI to talk to a REST API to manage this. playbook *host_vars/host.yml * --- inputs: - title:…
balpoint
  • 17
  • 4
0
votes
1 answer

ERRATA Different behavior for JMESpath on the jmeter extractor

I'm trying to extract highest value on array containing Null values; jmeter doesn't doing it, anyone know why? using: max(result[].data[].values[]) works fine at https://jmespath.org/tutorial.html ERROR o.a.j.e.j.j.JMESPathExtractor: Error…
Cleber
  • 5
  • 4
0
votes
2 answers

JMESPath filtering in s3

I have an object in s3 that looks like this: {'Key': '1111_redshift_us-east-1_dev-ue1-rs-analytics_useractivitylog_2021-05-01T20:18.gz', 'LastModified': datetime.datetime(2021, 5, 24, 19, 14, 40, tzinfo=tzutc()), 'ETag':…
Jwan622
  • 11,015
  • 21
  • 88
  • 181
0
votes
1 answer

How to extract all id's from a JSON response using JSON JMESPasth Extractor in Jmeter?

I created a get request to get all the entries which is 997 entries and used JSON JMESPath Extractor to store the entries ids in a list. The JMESPath expression I used is entries[*].id and I used ForEach Controller to loop through the list and use…
0
votes
1 answer

Ansible / jmespath - 1d list to zipped list of dictionaries

I'm attempting to transform a 1d list of AWS EC2 IDs into a list of dictionaries suitable for usage as the targets param to the Ansible elb_target_group module. Sample input: TASK [debug] ok: [localhost] => { "instance_ids": [ "i-1111", …
Brad Solomon
  • 38,521
  • 31
  • 149
  • 235
0
votes
1 answer

How to assign ansible variable output to another variable from nested list

I need help to perform join operation of Ansible task output. I have output as below: { "ansible_facts": { "server_and_its_status": [ { "name": "server1", "session": "enabled" }, …
0
votes
1 answer

Ansible Filter/Parse output to json

Im trying to filter ansible-playbook output to a valid json output so i can work with it. The output im getting is: ok: [r-sw01] => { "configlets | selectattr(\"name\", \"eq\", \"r-sw01\")": [ { "config": "hostname…
Batchen Regev
  • 685
  • 1
  • 7
  • 28
0
votes
3 answers

Az CLI query not displaying all columns properly

I have run the command az account list locations --output table and it displays me three columns with values in them: DisplayName, Name, RegionalDisplayName. Now I want to view only two columns e.g Name and RegionalDisplayName. So I run the…
Pallab
  • 1,915
  • 2
  • 19
  • 46
0
votes
0 answers

values coming as list.. required one value per cell in JMESPath

I have a nested json. I would like to extract the following values institution_id,investor_id,consultant_id .I cant seem to extract it properly. Please see below. Could anyone help please. { instituition_id : 112, name : 'abc', …
Sam
  • 1