有多个这样的对象
{K: "NS11061", item_group: "A", brand_group: "1"}
{K: "NS11061", item_group: "B", brand_group: "2"}
如何转换为
flag: "K",
code: "NS11061",
itemModifyImportBeanList: [
{
tagCode: "item_group",
tagValue: "A"
},
{
tagCode: "brand_group",
tagValue: "1"
}
]
flag: "K",
code: "NS11061",
itemModifyImportBeanList: [
{
tagCode: "item_group",
tagValue: "B"
},
{
tagCode: "brand_group",
tagValue: "2"
}
]
摸索了好久没找到合适的方法
jsfiddle demo 链接:https://jsfiddle.net/liangxh/...