JS结果中取某个字符的数据
论文问答
1
function didFetch(content) {
const value = [];
const data = content.data.map((item) => {
let arr = {
cashtotal: item.formData.numberField_kwjzrnw2,
ordercash: item.formData.numberField_kwjzrnwg,
customercash: item.formData.numberField_kwjzrnwf,
status: item.formData.textField_kwu551ag,
instid: item.formInstId
}
value.push(arr);
console.log(arr);
})
let result = {
"data": value,
"currentPage": content.currentPage,
"totalCount": content.totalCount
}
return result;
}
以上运行结果如下所示:
如果只取status: item.formData.textField_kwu551ag='已销帐'的数据,上面代码如何改?本人是JS小白,下图为console结果
发表回复