var obj=
[{id: 1, pId: 0, name: "采购商品", open: true}, {id: 2, pId: 1, name: "雨伞2", open: true}, {id: 2, pId: 1, name: "雨伞2", open: true}, {id: 2, pId: 1, name: "雨伞2", open: true}];
var x='';
$.each(obj, function (n, value) {
// alert(n + ' ' + value);
var trs = "";
trs += "tr>td>" + value.name + "/td> td>" + value.id + "/td>/tr>";
x += trs;
});
$("#project").append(x);