Skip to main content

Questions tagged [json-query]

Use this tag for tasks involving queries against a JSON document, such as extracting JSON components from a JSON text. The tag can also be used for query languages intended for specifying such queries.

json-query
-1 votes
1 answer
32 views

I am getting if 'data' in data and 'jobs' in data['data']: TypeError: argument of type 'NoneType' is not iterable this error [duplicate]

In this project we want to fetch metadata of UID and all the metadata has to convert into csv file so I want to add timebound to json query which has to fetch data within 24 hours but I encountered ...
Vaibhavi Mendre's user avatar
1 vote
1 answer
45 views

A JMESPath query is giving the correct number of items but they are all null when using it in json_query filter of Ansible

I have a simple Ansible play where I want to call a REST endpoint several times. I want to filter the result: only orders where the total for a product is less than 1000. By comparing the number of ...
Bakudan's user avatar
  • 19.4k
0 votes
1 answer
32 views

Piping to json_query in Ansible reveals no result?

I have an Ansible playbook that amongst other generates a Let's Encrypt certificate by cert-manager on my cluster server. But I have to wait until the certificate is ready, before I can continue to ...
Lasse Michael Mølgaard's user avatar
1 vote
1 answer
55 views

Extract JSON value with key containing dashes and provided via an Ansible variable

I am trying to retrieve a value from a JSON in Ansible, where the key contains dashes and is provided via a variable. I have the following data in Ansible: - set_fact: data: >- { ...
Adama's user avatar
  • 792
1 vote
1 answer
41 views

json_query not parsing registered variable containing JSON output with escaped double-quotes in Ansible

I have a cert creation tool that outputs certs like so: { "cert": "abc123......", "id": 10, "key": "abc123....." } The actual cert and ...
Chuck's user avatar
  • 39
0 votes
1 answer
47 views

JPA query for json column search

{ "store_ids":[ { "name":"Gupta General store", "store_id":"SSC10000020" }, { "name":"...
Vivek Singh Dhankhar's user avatar
0 votes
0 answers
18 views

json_query multiple selection selecting empty value

I have below json and i am trying to use json_query in ansible to select 'name' and 'id' of tasks only with failed state. I am using {"a": { "b": { "c": [ {&...
Bharath's user avatar
0 votes
0 answers
44 views

Ansible - parse values from multiple lists in loop

So I have been scratching my head and I think the solution is easy but can not see the light :-) I have this code which reads the registry and gets the MSSQL names: - name: check for instances ...
elmo's user avatar
  • 1
0 votes
1 answer
134 views

JSONata: How to get all paths from the payload?

How to get all the paths of the input object and traverse it according to my wish. One such use case is I want to convert the value of all except few fields/nested fields in a object to uppercase. For ...
Kamalakannan J's user avatar
0 votes
1 answer
56 views

Ansible how to filter dict key with double colon ::

Trying to filter "10.17.101.149" with a json_query. From this data: { "fact": { "network::ipv4_address": "10.17.101.149", "network": "...
dfs's user avatar
  • 172
0 votes
2 answers
45 views

Ansible - parse a list of nested dictionaries to create a new list

I have the following list of dictionaries "tor_vlan_list": [ { "switch_01": { "Vlan1": { "id": "1", ...
piercjs's user avatar
  • 317
0 votes
2 answers
95 views

oracle 19, json query, with arbitrary json data

I need to do this with Oracle 19c. I have arbitrary json data in a column of a table. I mean, I dont know the names of attributes, not even the deep the data is... Suppose that I can identify the json ...
javi_alt's user avatar
0 votes
0 answers
49 views

Elastic/Kibana Query: How to find the unique serial_number in documents that were present an hour ago but are not present now?

The system I am using generates logs for every device, each device has a unique serial number(serial_number in logs). As the devices are active we get logs every minute so if some device is closed ...
Ali Azlan's user avatar
  • 169
0 votes
0 answers
58 views

Is there way/possible to use IN operator in JMESPath

I'm trying to compare the attributes of a JSON object based on condition. I.e.: if is_encrypted = YES encryption.state == 'encrypted' or a[0].name in encrypted_list else NO encrypted_list contains: { ...
Priyanka's user avatar
0 votes
1 answer
251 views

Add RegEx pattern inside JSON string using JSON_QUERY()

I have RegEx details table and I want to make array object. I am trying to make JSON using JSON_QUERY() then I getting error like: "JSON text is not properly formatted. Unexpected character '&...
Deep Thumar's user avatar

15 30 50 per page
1
2 3 4 5
18