Please check this - https://try.jsonata.org/0L_oYffzT
Here the output of the $map function is not an array.
whereas https://try.jsonata.org/Rf8UI_TMy seems to work fine when the input array is more than 1 in length.
Please check this - https://try.jsonata.org/0L_oYffzT
Here the output of the $map function is not an array.
whereas https://try.jsonata.org/Rf8UI_TMy seems to work fine when the input array is more than 1 in length.
You may use the result structure feature to accomplish this task:
Using
$map
for this purpose has an open issue that point to workarounds only