const data = [{
"Z:精细运动,28项": "编码",
"__EMPTY": "总分",
"__EMPTY_1": "任务名称",
"__EMPTY_2": "任务目标",
"__EMPTY_3": "提问",
"__EMPTY_4": "例子",
"__EMPTY_5": "评分标准",
"__EMPTY_6": "备注"
}, {
"Z:精细运动,28项": "Z1",
"__EMPTY": 1,
"__EMPTY_1": "用蜡笔在纸上涂鸦",
"__EMPTY_2": "学生将能够用蜡笔在纸上涂鸦",
"__EMPTY_3": "学生能够用蜡笔在纸上涂鸦吗?",
"__EMPTY_5": "0=否"
}, {
"__EMPTY_5": "1=是"
}, {
"Z:精细运动,28项": "Z2",
"__EMPTY": 1,
"__EMPTY_1": "把物品放到形状盒里",
"__EMPTY_2": "学生将能够把各种形状的物品放进形状盒里",
"__EMPTY_3": "学生能够把各种形状的物品放进形状盒里吗?",
"__EMPTY_5": "0=否"
},{
"__EMPTY_5": "111111111"
} ,{
"__EMPTY_5": "1=是"
}]
let datafilter = []
let count=0
for (let i = 0; i < data.length; i++) {
let flag=0
if (Object.keys(data[i]).length == 1) {
console.log(count)
console.log("====")
console.log(i)
data[count]["__EMPTY_5"]=data[count]["__EMPTY_5"]+"|"+data[i]["__EMPTY_5"]
// console.log("====")
}
else{
count=i
datafilter.push(data[i])
}
}
console.log(datafilter)
console