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": "2024-04-26", "value": 40 }, {…
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": "2024-04-26", "value": 40 }, {…
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 to only show…
I'm looking for a solution of grouping elements from a flat hierarchy into a encapsulated one with the help of JSONata. Given that I have the following input data: [ { "restaurantName": "Pizza Place", "restaurantId": "1", "dishName": "Margherita Pizza", "dishId":…
Let's say I have the following JSON { "Fruits" : ["apple", "mango", "banana"]; "Index" : 2 } How do i navigate the array "Fruits" such that i could use index as the index number I.e. If i write Fruits[Index], it…
I have JSON object where I have a key policyList whose value type is array. Inside policyList there is another array under the key named product. There is amount field present in each object of the array product. I want…
I want to use JSONata (https://try.jsonata.org/) or JSONPath to combine column data from a Columns array with row data from a Rows array in the same JSON. I think I need to have a for each row with another for…
I have json object as follows {"resources":[{"srno":"1","name":"name1","projects":[{"prjname":"abc"}]},{"srno":"1","name":"name1","projects":[{"prjname":"def"}]},{"srno":"2","name":"name2","projects":[{"prjname":"abc"}]},{"srno":"4","name":"name4","projects":[{"prjname":"prq"}]},{"srno":"4","name":"name4","projects":[{"prjname":"stu"}]},{"srno":"4","name":"name4","projects":[{"prjname":"uvw"}]},{"srno":"5","name":"name5"}]} How can I get resources grouped by id,name - each of that should contain list of projects? basically,flattened to structured i.e. {"resources":[{"srno":"1","name":"name1","projects":[{"prjname":"abc"},{"prjname":"def"}]},{"srno":"2","name":"name2","projects":[{"prjname":"abc"}]},{"srno":"4","name":"name4","projects":[{"prjname":"prq"},{"prjname":"stu"},{"prjname":"uvw"}]},{"srno":"5","name":"name5"}]} can someone share jsonata expression to create same
I have been having trouble finding an appropriate solution for this as I have little experience working with JSON arrays and querying json with JSONata Here is a simplified version of my JSON array: [ { "job":1, "issue":"red", "issuesInJob":50 },…
I am starting with an object having two values that are arrays. For each one I want to match all non-array values with the array values but with the index values in order e.g, index zero from each array, index…