JSONata - assign value as property name

Lets say i have an array of objects:

[{"Datum":"2020-03-25", "value":32}]

I want to use the value of "Datum" as key/prop name, is this possible in jsonata ?

Expected output:

[{"2020-03-25":32}]

Found it, I can use:

{$string(payload.Datum): payload.value}

First issue solved.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.