Skip to main content

Questions tagged [jsonata]

JSONata is a JSON query and transformation language.

0 votes
0 answers
25 views

Unable to load JSONATA into duktape JavaScript engine

I'm trying to use jsonata for python in a Jupyter notebook running in Visual Studio Code. I have installed jsonata via %pip install jsonata, and have imported it via import jsonata. However, when I ...
Evan Aad's user avatar
  • 5,967
0 votes
3 answers
47 views

Removing an array object from main Object

I am trying to remove an array object based on value of array object property by using JSONATA transform function but the array object is not getting removed. If pmtDtls.lnAprvlStatus ='D', the object ...
ashok jha's user avatar
0 votes
1 answer
56 views

Search for an element in a global context messages array in node-red

Context I defined in the context of my node-red instance a global context variable "devices" with each element defined by the {device_id, agent_id} element pair that it obtains from the ...
breakfastea's user avatar
0 votes
2 answers
44 views

how to merge children to an array in jsonata

How can I merge the objects from "123" and "Trilby hat" { "123": { "Price": 68.9, "Qty": 2, "ProductID": 858383 }, "Trilby hat": ...
dags's user avatar
  • 13
0 votes
2 answers
74 views

devide values with JSONata

JSONata is honestly driving me crazy. I asked something similar a couple of weeks ago, but I still don't know what I'm doing so here I am again. What I'm working with: [[ { "time": &...
Imaginary-Pea's user avatar
1 vote
1 answer
43 views

Combine dictionaries with same key using JSONata

I am trying to combine the information from two dictionaries into one. I have a JSON like this: { "First": { "example1": [ { "key": &...
Imaginary-Pea's user avatar
0 votes
1 answer
37 views

JSONata, error applying expression to arrays of jsons inside multi-level JSON

I used to have an input of the form: [{ "id": "abc", "week": "2024-01-01", "type": "renovation", "amount": "0" },...
bec's user avatar
  • 1
0 votes
1 answer
52 views

Jsonata Transformation to extract a value and make it a key

Jsonata newbie here. I need help with Jsonata Transformation to extract a value from json element and make it as key . { "key-1":[{ "id":"a", "value":2.3 },{...
rage2spirit's user avatar
0 votes
1 answer
41 views

How to deal with an empty array when filtering?

If I have this input [ { "data": 4 }, { "data": 7 } ] and the expression $.data[], I get [4, 7]. If the input array is empty instead [], I get no match. I want an ...
iron9's user avatar
  • 490
1 vote
2 answers
70 views

Get the top n items in array with JSONata

How can I get the top 5 keys with the highest values from a JSON using JSONata? Let's say I have something like this. They keys aren't alphabetically ordered, but the values are descending and I want ...
Imaginary-Pea's user avatar
0 votes
1 answer
43 views

How to make JSONata for getting results like

If I have a source like { "Data": { "CREATED": "2022-04-08", "EDITED": "2023-04-08" } } I want to get an output like { &...
topto's user avatar
  • 5
0 votes
0 answers
28 views

Jsonata Get path element for each occurrence

My json: { "adminShifts": { "1": [ { "adminShiftId": 2490609, "annotation": "", "dutyID": 64404, ...
Юрий Курилкин's user avatar
0 votes
1 answer
98 views

In JSONata How to print date from todays date+60 calendar days

For eg: if today's date is 03/39/2024, it should print after 60 days -05/28/2024 Code to get today's date: $fromMillis($toMillis($now()), '[M01]/[D01]/[Y0001]') But how to print for 60 calendar ...
Shree's user avatar
  • 3
1 vote
1 answer
30 views

jsonata merge array with aggreate

with this example https://try.jsonata.org/J_4M9J9JS from this result { "123": [ { "Price": 34.45, "Qty": 2, "ProductID": 858383 }, { "Price": 34.45, &...
dags's user avatar
  • 13
0 votes
1 answer
80 views

jsonata expression to append the value

i have a json object as in below { "_namespace": "kubernetes", "api_paths": [ { "api_action": "post", "api_path": "...
Venkat Akurathi's user avatar

15 30 50 per page
1
2 3 4 5
16