I have several objects like this:

I want to move type and value one step up so they will be next to field, and then delete data.
It looks like this when departments is converted to JSON:
[
{"field" : "DEPARTMAN_NO",
"data" : { "type":"numeric" , "comparison":"eq" , "value":11 }
},
{"field" : "DEPARTMAN_ADI",
"data" : { "type":"string" , "value":"bir" }
}
]
I have tried:
departments = grid.filters.getFilterData();
i = {};
for(var i in department) {
department = i.data;
delete.department.data;
};
but it dosen’t work.
1) First, loop
departments, each item we call itdepartment;2) You want to move
department.data‘s properties todepartment, From another angle, you can movedepartment‘s properties todepartment.dataand returndepartment.data, code like:result:
view the full demo http://jsfiddle.net/KVYE5/