Class JSON strings are merged according to hierarchical relationships

known to have two hierarchical relationships of JSON-like strings, can not be converted into objects, how to get them to merge.

the code is as follows:

var str1 = "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) -> { name: value3.name })
      })
    })
  })
}"

var str2 = "data : {
  item : ( payload.data.list map(value0, index0) -> {
    gradeList : ( value0.gradeList map(value1, index1) -> {
      otherList : ( value1.otherList map(value2, index2) -> { name: value2.name })
    })
  })
}"

you can see the anotherList in str1 and the otherList in str2

expect the following results

"{
  data: {
    list: (payload.data.list map (value0, index0) -> {
      gradeList: (value0.gradeList map (value1, index1) -> {
        otherList: (value1.otherList map (value2, index2) -> {
          anotherList: (value2.anotherList map (value3, index3) -> {
            name: value3.name
          }),
          name: value2.name
        })
      })
    })
  }
}"
Jun.28,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bf4493-31ede.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bf4493-31ede.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?