【发布时间】:2016-01-03 06:35:16
【问题描述】:
我有一个这样的 JSON 响应:
{
id_order: '123123asdasd',
products: [
{
description: 'Product 1 description',
comments: [
{
id_comment: 1,
text: 'comment1'
},
{
id_comment: 2,
text: 'comment2'
}
]
}
]
}
例如,我如何使用lodash 删除一个 id_comment 等于 1 的对象?
尝试使用_.remove 没有成功。
解决方案
【问题讨论】:
-
当您说“尝试使用....”时,请向我们展示代码
标签: javascript arrays object lodash