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.
Questions tagged [json-query]
254 questions
0
votes
1 answer
Arithmetic operation in json_query (syntax wrong) - Ansible
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 syntax for this arithmetic operation.
- hosts:…

LJS
- 317
- 1
- 9
0
votes
2 answers
Does JSON_QUERY have a data limit in oracle 12c
I need an array to be extracted from a json column in oracle 12c. JSON_QUERY is working for some rows while it isnt returning anything for a few rows.
I'm trying to extract the array which is in the 56th row and the array contains about 11000…

AnuC
- 131
- 1
- 11
0
votes
3 answers
SQL Server - How to create custom JSON from SELECT with "key": derived from GROUP BY clause
I am trying to get nice overview of dependencies of tables.
My query looks like this: (if there is something better than STRING_AGG, please let me know)
SELECT
[schema] = referencing_schema_name,
[objects] = JSON_QUERY('["'
+…

Dalton
- 347
- 3
- 15
0
votes
1 answer
SQL Server 2019 - Build JSON with spread operator
I'm required to supply a json object like this:
[
{
id: '59E59BC82852A1A5881C082D5FFCAC10',
user: {
...users[1],
last_message: "16-06-2022",
topic: "Shipment"
},
unread: 2,
…

Joe
- 1,033
- 1
- 16
- 39
0
votes
2 answers
Remove the square and curly brackets from the column of joined table in Microsoft SQL server
I'm using Microsoft SQL server v14.0.1000
I'm using the below query to convert my query result into JSON :
SELECT TOP(5) dn.id AS ID,
dn.EventTimeStamp AS EventTimeStamp,
dn.ControllerId AS ControllerID,
JSON_QUERY((SELECT…

saurabh
- 31
- 6
0
votes
0 answers
can't load json-query package
In Windows cmd, I typed
npm install json-query
It seemed successfully by typing:
npm -v json-query
It said version of 8.5.5.
In my HTML, I did