func main() {
a := []byte(`{"Parents": [ "aaaaa", "bbbbbbb" ]}`)
b := []byte(`{"Parents": [ "Gomez", "Moticia" ]}`)
var arr []interface{}
js, _ := simplejson.NewJson(a)
nodes, _ := js.Map()
p := nodes["Parents"]
d := p.([]interface{})
for _, v := range d {
arr = append(arr, v)
}
js, _ = simplejson.NewJson(b)
nodes, _ = js.Map()
p = nodes["
golang json数组拼接
最新推荐文章于 2023-06-18 19:18:39 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)