深层json数组、对象相互嵌套如何赋值?

深层json数组、对象相互嵌套如何赋值?

请问各位大神,代码如下,如何把4处的profData赋值给1处的profData,把3处的subjectData赋值给1处的subjectData?

        // 1

treeData: [{

qualName: '',

qualCode: '',

subjectData: [{

subjectName: '',

subjectCode: '',

profData: [{

profName: '',

profCode: ''

}]

}

]

}

],

// 2

qualData: [{ qualName: "工学", qualCode: "Q06" },

{ qualName: "理学", qualCode: "Q07" }]

// 3

subjectData: [{ subjectName: "计算机", subjectCode: "S01" }]

// 4

profData: [{ profName: "软件工程", profCode: "P01" }]

以上是 深层json数组、对象相互嵌套如何赋值? 的全部内容, 来源链接: utcz.com/p/936539.html

回到顶部