I was looking at an Object like this:
{"user": {
"name": "Harry Peter",
"phoneNumber": "12345",
"products": [
{
"type": "card",
"accountId": "5299367",
},
{
"type": "Loan",
"accountId": "5299365",
},
{
"type": "card",
"accountId": "8299388",
},
]}
}
My question is whether the user has both a loan and a card product, or just a loan.
Are there any existing functions in JavaScript or Angular that can help me find out?
If anyone has suggestions on how to accomplish this, please share. Thank you!