var newResult={}
table.insert(newResult,{order_id=22;title='dddddddddd'})
table.insert(newResult,{order_id=25;title='eeee'})
console.dump(newResult);
构造二级数组
应用
p_result=grid.items;
var newResult={}
for k,v in table.eachIndex(p_result){
table.insert(newResult,{order_id=v[1];title=v[2]})
}
console.dump(newResult);
//结果
{
[1]={order_id=115;title=100};
[2]={order_id=56;title=49}
}