the data structure of exConfig is as follows:
exConfig:[{
exConfigName:"1",
exConfigKey:"itemCode1"
},
{
exConfigName:"3",
exConfigKey:"itemCode2"
},
{
exConfigName:"4",
exConfigKey:"itemCode3"
},
{
exConfigName:"6",
exConfigKey:"itemCode4"
}]
the structure of the data1 object is as follows:
data1:{
itemCode:"900001",
itemCode2:"900002",
itemCode3:"900003",
itemCode4:"900004"
}
the structure of the data2 object is as follows
data2:{
itemCode:"900001",
itemCode2:"900002",
itemCode3:"900003",
itemCode4:"900004"
},
ask how to write a traversal loop if you want to get the following data structure
exConfig:[{
exConfigName:"1",
exConfigKey:"itemCode1",
data1:{
itemCode:"900001"
},
data2:{
itemCode:"900001"
}
},
{
exConfigName:"3",
exConfigKey:"itemCode2",
data1:{
itemCode2:"900002"
},
data2:{
itemCode2:"900002"
}
},
{
exConfigName:"4",
exConfigKey:"itemCode3",
data1:{
itemCode3:"900003"
},
data2:{
itemCode3:"900003"
}
},
{
exConfigName:"6",
exConfigKey:"itemCode4",
data1:{
itemCode4:"900004"
},
data2:{
itemCode4:"900004"
}
}]