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.

254 questions
0
votes
1 answer

Exclude json object in list that does not contain a vale

How do you remove json objects that do not contain a specific value? In the json below how do you keep objects block that contains "11.22.33.0/24"? How can this be achieved with jinja or Ansible filtering? json content my_data: description: "for…
0
votes
1 answer

How to get the id from json?

Given that i have the below json: { "id": "images", "type": "collection", "href": "https://api.ionos.com/cloudapi/v5/images", "items": [ { "id": "2bdfc61e-1ff7-11ea-af1c-525400f64d8d", "type": "image", "href":…
Jeff
  • 7,767
  • 28
  • 85
  • 138
0
votes
1 answer

TSQL JSON_QUERY can you use a filter in the JSON Path

I have a table with a column that holds valid JSON, heres an example of the JSON structure: { "Requirements": { "$values": [ { "$type": "List", "ListId":…
0
votes
1 answer

Ansible json_query() with variable as key

I have following JSON input: { "a goo": { "link": "google.com" }, "b ms": { "link": "microsoft.com" }, "c amz": { "link": "amazon.com" } } I'd like get the link string ("google.com"…) according to variable {{ target…
Ferite
  • 3
  • 1
  • 3
0
votes
2 answers

MarkLogic cts:query contains unknown child in REST API jsonPropertyRangeQuery

I construct below payload in MarkLogic REST API: "query": { "jsonPropertyRangeQuery": { "property": "rangeChange", "operator": ">", "value": 60 } } It throws error: "messageCode":"MANAGE-INVALIDPAYLOAD",…
Fiona Chen
  • 1,358
  • 5
  • 16
0
votes
1 answer

Extracting Full Name from JSON string

I have a json string as shown in the example below, and I need to extract from it the Full Name of the members. I know I can extract each of them separately with $.members[*].lastName and $.members[*].firstName but I can't seem to figure…
HelpWanted
  • 71
  • 1
  • 9
0
votes
1 answer

Token Comma expected - can not run JSON query

This is a problem i have working in Excels Power Query. I have this query saved in a variable named "content" which is passed to the call Web.Contents. I can not run the query, i get "Token Comma expected" error. Can somebody tell what that is…
0
votes
1 answer

ansible JEMSPATH errors while parasing ansible facts

i am trying to filter all the strings which contains "RegButton-" from the below ansible facts and use the output as list of items in the next play. trying to use json_query filter but it is failing with below error ansible fact { …
mikeraj2019
  • 39
  • 2
  • 10
0
votes
1 answer

How to get an "username" for "cifs" mounts from ansible_facts?

I need to get cifs mounts credentials, I think getting username from ansible_facts, and after get a password from '/etc/fstab' But "ansible_facts" => "mounted_devices" => "options" gaves me not just a…
Junior
  • 1
  • 1
0
votes
1 answer

how to loop ansible json_query

is there any way to simplify the below json_query? here you can see that i am trying to extract three values using three setup of queries. Since i have three items in the list the value will be generated three times corresponding to the item list.…
mikeraj2019
  • 39
  • 2
  • 10
0
votes
1 answer

SQL Server 2016 select where in json array of objects with normal table

Please help me with sql query to fullfill below requirement I want to join a table with another table having a JSON column with two string column comparison. This query is for Azure SQL DB i want to join Table 2 with Table 1 where it should satisfy…
Raghavendra C
  • 155
  • 1
  • 13
0
votes
2 answers

How to filter and rename elements in a list of hasmaps with `json_query`

I am trying to filter and rename some elements from a list of hashmaps using json_query I have the following sample data in my ansible facts: "ansible_mounts": [ { "block_used": 136260, "uuid":…
sloweriang
  • 308
  • 4
  • 19
0
votes
1 answer

T-SQL - JSON_QUERY : select json properties with special characters in the property name

I'm facing some issues while trying to select a value from a JSON column. The json is: { "$type":"myNameSpace.myClass, myDll" } And I'm trying to query it with something like SELECT myIdColumnName, myJsonColumnName, JSON_QUERY(myJsonColumnName,…
ddfra
  • 2,413
  • 14
  • 24
0
votes
1 answer

What are the querying capabilities and syntax for JSON query in an Azure workbook?

In Azure workbook edit mode, I clicked Add query and set Data source to JSON. I could not find any documentation what is the syntax I can use. I looked for it in the official doc articles like: - Workbooks how-to - Workbooks for VMs I managed to get…
0
votes
3 answers

How to use Json queries with c# using HttpClient

I am using C# to connect to IBM Cloudant. IBM Cloudant supports JSON queries IBM Cloudant, it is mentioned that I need to use a POST request in order to create a query but it is not explained, I am using HttpClient which has a method PostAsync…