jsonata-js/jsonata

How to work with parent object and transform values

mwpowellhtx opened this issue · 0 comments

I have a JSON in the following structure, how would we express this transformation. Note that we want the result to be the same shape as the input.

{
  "99": { "Price": 999 }
  , ...
}

We have the JSON object, key value associative pairs, the object on the RHS has a "Price", can have other kvp as well, all should remain in tact. The only thing we want to do is transform the Price accordingly.

How might we go about doing that with the JSON-aytah ?

Note, I am no stranger to data shapes, transformations, etc; so high level guidance. If it is even possible with JSON-ata.

Thank! Cheers. 🍻