I have an array in which i want to compare the object 'defaultvalue' and 'selectedvalue' in type script if there is a value in object 'higherOptions' using typescript.
let coverageArray = [
{
"id":1,
"defaultValue": 100000,
"selectedValue": 100000,
"higherOptions": []
},
{
"id":2,
"defaultValue": 300000,
"selectedValue": 300000,
"higherOptions": [150000, 300000]
},
{
"id":3,
"defaultValue": 500,
"selectedValue": 500,
"higherOptions": [500, 1000]
},
{
"id":4,
"defaultValue": "ALS (12 months of restroration)",
"selectedValue": "ALS (12 months of restroration)",
"higherOptions": []
},
{
"id":5,
"defaultValue": 15000,
"selectedValue": 15000,
"higherOptions": [ 15000, 20000, 25000, 30000, 35000 ]
}];