Array of strings to numbers and naming them

The JSONata expression would be like below except the names array would have 8 elements

(
    $names := ["one","two"];
    $$.payload#$i.${$names[$i]: $number($)}
)
1 Like