Hey I need to map this array of products. I want to get the full objects after search with a specific value of the code
property.
For example, how do I find all objects where the code
is "balance"
?
"products": [{
"code": "balance",
"currency": "ILS",
"percentage": 1,
"totalWorth": 150000,
"totalYieldPer": 0,
"items": [{
"name": "בנק של עומרי",
"currency": "NIS",
"worth": 150000,
"portfolioPer": 1,
"yield": 0,
"yieldPer": 0
}]
}, {
"code": "debt",
"currency": "ILS",
"percentage": 1,
"totalWorth": 150000,
"totalYieldPer": 0,
"items": [{
"name": "משכנתא על הדירה שלי",
"currency": "ILS",
"worth": 150000,
"portfolioPer": 1,
"yield": 0,
"yieldPer": 0
}]
}, {
"code": "pension",
"currency": "ILS",
"percentage": 1,
"totalWorth": 150000,
"totalYieldPer": 0,
"items": [{
"name": "פנסיוני",
"currency": "ILS",
"worth": 150000,
"portfolioPer": 1,
"yield": 0,
"yieldPer": 0
}]
}]
}