When trying to change a single element in an array, I get Invalid path expression near attempt to access element
- but only when the array is captured from --rawInput
.
Example:
# input: [ 1, 0 ]
. as $list | $list[0] = 30
# output: [ 30, 0 ]
But this doesn't work:
# input: 1,0
split(",") | map(tonumber) as $list | $list[0] = 30
# Invalid path expression near attempt to access element 0 of [1,0]
Any ideas?