var data = [
{ id: 0, ssokid: "a", page_no: 1, color: "rgb(255,0,0)", markertext: "text1" },
{ id: 0, ssokid: "b", page_no: 2, color: "rgb(255,255,0)", markertext: "text2" },
{ id: 0, ssokid: "c", page_no: 3, color: "rgb(255,0,0)", markertext: "text3" }
];
我想从数据中删除所有“ id”和“ ssokid”,并将颜色值更改为红色或黄色,而不是rgb格式。
结果必须是这样;
var data = [
{ page_no: 1, color: "red", markertext: "text1" },
{ page_no: 2, color: "yellow", markertext: "text2" },
{ page_no: 3, color: "red", markertext: "text3" }
];