I have this JSON that I'm filtering
js
this.filteredMisc = this.missions.filter( mission => misc?.Name?.toLowerCase().includes(evt.target.value.toLowerCase())
|| misc?.Status__c?.toLowerCase().includes(evt.target.value.toLowerCase())
|| misc?.Tasks__r?.Assigned_Agency__r?.Name?.toLowerCase().includes(evt.target.value.toLowerCase())
);
JSON misc
[{
"Id": "a2b3S000000ddddddO",
"Name": "20-xxxx-00021",
"Status__c": "En Route",
"Tasks__r": [{
"Sub_Summary__c": "a2b3S000000ss1sssO",
"Name": "T-000130",
"Summary__c": "cxb",
"Status__c": "Check",
"Agency__r": {
"Name": "gwsdfg",
"Id": "0013S00000GOhjiQAL"
}
}, {
"Sub_Summary__c": "a2b3S000000ss2sssO",
"Name": "T-000129",
"Summary__c": "test",
"Status__c": "On",
"Agency__r": {
"Name": "County",
"Id": "0013S00000CfgfHQAV"
},
}]
},
. . .
Name and State work just fine, however when I need to drill down into an object like Tasks__r it fails because I need to iterate through them. Is there an easy way to do this?