当尝试更改数组中的单个元素时,我得到了Invalid path expression near attempt to access element
- 但仅当从--rawInput
.
例子:
# input: [ 1, 0 ]
. as $list | $list[0] = 30
# output: [ 30, 0 ]
但这不起作用:
# input: 1,0
split(",") | map(tonumber) as $list | $list[0] = 30
# Invalid path expression near attempt to access element 0 of [1,0]
有任何想法吗?