is to replace the null string in each element with the next element, resulting in a replacement string.
related codes
/ / the list array is as follows
var list = [
"data : {null}",
"item : ( payload.data.list map(value0, index0) -> {null})",
"gradeList : ( value0.gradeList map(value1, index1) -> {null})",
"otherList : ( value1.otherList map(value2, index2) -> {null})",
"anotherList : ( value2.anotherList map(value3, index3) -> {null})"
]
the desired result is a string
"data : {
item : ( payload.data.list map(value0, index0) -> {
gradeList : ( value0.gradeList map(value1, index1) -> {
otherList : ( value1.otherList map(value2, index2) -> {
anotherList : ( value2.anotherList map(value3, index3) -> {null})
})
})
})
}"