0
我有对象滤波器深嵌套属性返回空数组
var data = [{type:"A",parentPersonInfo:{id:1,fullname:'john smith'}},{type:"A",parentPersonInfo: {id:1,fullname:'jim smith'}},{type:"B",parentPersonInfo: {id:2,fullname:'jane smith'}}]
我想使用lodash以提取其中type = A和id = 1
const testId = 1;
_.filter(data,{'type':'A','data.parentPersonInfo.id':1});
但我得到的结果[阵列]
是否有任何原因您没有创建MCVE? – Amit
@Amit什么是MCVE – shresthaal
http://stackoverflow.com/help/mcve – gearsdigital