i should take a JSON value, like
{
"cnt": 5
}
and create JSON object from JSONata, like
{
"1": 1,
"2": 4,
"3": 9,
"4": 16,
"5": 25,
}
I tried to do that, but i cant join two expressions correctly.
{
"" & [1..cnt] : [1..cnt].($*$)
}
and i get as a result:
{
"[1,2,3,4,5]": [
1,
4,
9,
16,
25
]
}
Can anybody help me with this(
Try [1..cnt]{$string($): $*$}