Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
2 votes
1 answer
98 views

I've been trying to parse email addresses from the below json data: "msg": [ { "fqdn": "www.westero.local", "function": "", ...
pilipeet's user avatar
1 vote
1 answer
124 views

CSV files on each host contain certain figures and I need to add them all up. To that end, I find the matching files first, and invoke awk to parse the CSV content and output the per-host total. Where ...
Mikhail T.'s user avatar
  • 4,256
2 votes
1 answer
82 views

I have a requirement to print the following output: matchId rainyDate sunnyDate 1 2024-09-04 2024-09-04 1 2024-09-11 2024-09-12 1 2024-09-18 2024-09-19 2 2024-10-04 2024-10-04 2 2024-10-11 3 There is ...
Dhruva Sen Gupta's user avatar
1 vote
3 answers
177 views

We are doing an In-Place Upgrade from RHEL 7 to RHEL 8 in my organization and we've come to find out that not all RHEL 7 packages are removed after an OS Upgrade. I've been asked to report on all RHEL ...
Zack McCain's user avatar
2 votes
1 answer
71 views

I'm trying to edit a dictionary in ansible with a one line json_query (and/or other filters), but something is wrong and I can't figure it out. I have this structure (with example data) seinfeld: - ...
Gianmarco's user avatar
0 votes
2 answers
227 views

Is there a way to get the last item of a JSON array using a JSON query only (in this case Newtonsoft.Json SelectToken method)? I can not use the Last method from Newtonsoft.Json, as I get the query ...
AmirHosseinMp02's user avatar
0 votes
0 answers
90 views

so i got json back from an openstack server query, but need to extract the mac address for the server. Getting the name and IP is easy enough but the mac address is hidden behind the vlan and a colon. ...
ibellinf's user avatar
0 votes
1 answer
195 views

I'm working with DB2 using a "data" column containing a JSON object stored as a CLOB. To simplify my scenario consider this (easier) example: CREATE TABLE Students ( StudentID INT ...
Canediguerra's user avatar
-1 votes
1 answer
41 views

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
109 views

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.5k
0 votes
1 answer
103 views

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
155 views

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
148 views

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

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

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
  • 13
0 votes
1 answer
372 views

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
156 views

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
  • 322
0 votes
2 answers
91 views

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

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
94 views

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
287 views

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
1 vote
1 answer
699 views

I have a situation where I'm writing a playbook for changing attributes of virtual machine, and the input I get comes from an automation that outputs the following, which is then passed in extra_vars: ...
AniketGM's user avatar
  • 1,002
-1 votes
1 answer
46 views

block: - name: Retrieve Source Volumes List uri: url: "https://{{ dms_ip }}/api/source/volumes" url_username: "{{ credential_dms.username }}" ...
kalyanyellapu's user avatar
1 vote
1 answer
163 views

I'm having issues using json_query to filter arrays that have a certain key value. This is what shows as the API result when given the direct path to it. ok: [localhost] => { "msg": [ ...
sevenstreak's user avatar
0 votes
1 answer
949 views

I am fairly new to Ansible and am trying to create a playbook that will look at my Docker Swarm machines, check what NFS shares are already mounted, mount specified NFS shares from a list if they are ...
Travis Williams's user avatar
1 vote
2 answers
403 views

I have a table in SQL Server to keep all of the users app reviews. When the user reviews the app with 4 or 5 stars I recieve JSON like this one { "Calificacion": 5, "...
Rodrigo Jimenez's user avatar
1 vote
1 answer
509 views

Does JMESPath have an 'in' like operator, that will be true if a key's value is present in an array of strings? Given the following snippet of data, (assume the number of items is much larger, and I ...
J. M. Becker's user avatar
  • 2,873
1 vote
1 answer
103 views

I have the following dictionary grouped: 10000: - {Id: 10001, Name: North_America, Parent_Id: 10000, Type: Country} 10001: - {Id: 10011, Name: Maine, Parent_Id: 10001, Type: State} ...
piercjs's user avatar
  • 317
1 vote
1 answer
998 views

I've run into a frustrating problem with Ansible and trying to parse a complex JSON object. I need to find the physical volume, logical volume, disk name, and partition name for the devices that are ...
Mike Staffa's user avatar
0 votes
1 answer
258 views

I have a list of dictionaries and for all items in this list, I want to convert one key-value pair epoch time to datetime but I'm getting an error "JMESPathError in json_query filter plugin:\...
LJS's user avatar
  • 337
-2 votes
1 answer
62 views

I have a SQl Server query defined as follows: SELECT ROW_NUMBER() OVER (ORDER BY p.SKU) AS Id, p.Id AS ProductId, p.SKU, 'ImageURL' AS ImageURL, p....
BedfordNYGuy's user avatar
1 vote
1 answer
186 views

I have the following data that I'm trying to filter: "flags": [ "inhibitor" ], ......(some data here).... "flags": [], ......(some other data ...
pilipeet's user avatar
0 votes
1 answer
74 views

I have the below JavaScript file. I want to iterate through the "data" object and print the "ami" values. However, the query is not working. 'result.value' is null. I am not sure ...
FirelordZuko's user avatar
1 vote
1 answer
167 views

I have the below output that I'm trying to parse and filter: - name: lvs debug: msg: "{{ ansible_lvm.lvs }}" ok: [localhost] => { "msg": { "...
pilipeet's user avatar
1 vote
2 answers
196 views

I wonder if this query is possible using json query. I need to select all records that have more than 3 values a like. for example, I have an array [1,2,3,4,5,6]. Database record has: # ["1",...
user21679533's user avatar
1 vote
2 answers
815 views

I have the following dictionary: "dict": [ { "name": "a", "surname": "b" }, { "name": "c", "surname": "d&...
LJS's user avatar
  • 337
1 vote
1 answer
148 views

I am trying to use JSON query to dynamically generate lists The state of the variables is: fabric: vrfs: - name: VRF-A description: Production-Network id: 10001 vlan: 2002 ...
Jorge Gomez's user avatar
0 votes
2 answers
224 views

long time listener / first time caller. In ansible, I’m using the json_query in jmespath and am unable to figure out how to make it do what i want exactly. If I have a blob of data like this about a ...
KDP's user avatar
  • 1
2 votes
2 answers
189 views

I have a table with a varchar(max) column that stores JSON data and one of the records has an extra comma at the end of an array in the JSON. The following statement results in an error Unexpected ...
sartoris's user avatar
  • 939
0 votes
1 answer
339 views

I have the following table in a mariadb database | model_id | model_name |model_json | then on the field model_json I have the following json {"class":"GraphLinksModel", "...
Alejandro Da Costa Urrutia's user avatar
0 votes
1 answer
184 views

I'm trying to extract the result from the value "mac_addr" and then register it (in this case 00:50:56:a2:57:c9) The output I'm working with "msg": [ { "...
Hazen's user avatar
  • 3
2 votes
2 answers
862 views

[ { "Level" : "S1", "Major" : "Teknik Informatika" }, { "Level" : "SMA", "...
Irvan Affandy's user avatar
0 votes
0 answers
56 views

I have an API below and I'm wondering how I can query the "name"? in the URL and also I'm trying to use this API with retrofit. https://i.sstatic.net/kqZeV.jpg { "code": 200, "...
Marwan Talal's user avatar
0 votes
1 answer
223 views

I wanted to create a table using PIVOT operator in SQL Server by extracting data from a JSON object using JSON_QUERY(). But when I use JSON_QUERY() inside IN operator, syntax error is thrown. DECLARE @...
Hey Itsme's user avatar
0 votes
1 answer
538 views

how are you doing ? So, I am trying to extract two informations from a json. it is a response from API with all information about a specific server in a cloud plataform. So, with curl, I can show the ...
Édnei Rodrigues's user avatar
0 votes
1 answer
42 views

I'm writing a stored procedure to get list of IOT parameter data under a specific machine and the result of stored procedure should have a specific JSON format. the problem is, when I tried to add a ...
dode's user avatar
  • 5
2 votes
3 answers
394 views

I have the following JSON data { "docker_compose_init_result": { "changed": true, "failed": false, "services": { "...
Mangosniper's user avatar
0 votes
1 answer
725 views

I am writing an Ansible role to fetch current details of Audit settings from SQL Server through ansible.windoww.win_powershell module. In doing so, I am trying to use json_query in Ansible that has ...
user avatar
0 votes
0 answers
53 views

I'm building a json query to pass to a mongodb database in R. In one scenario, I have a vector of dates and I want to query the database to return all records which have a date in the relevant field ...
Amy M's user avatar
  • 1,103
0 votes
1 answer
234 views

I have the following dictionary: dict1: {x: 1, y: 2} I want to add third value z that should be (x/y)*100, or in other words percentage. This is the code I wrote, but something is wrong with the ...
LJS's user avatar
  • 337

1
2 3 4 5 6