I would like to find a solution that returns the following result when any of the property "value" is true.
This is what I have tried so far, but so far it has not worked
public displayCondition(data:any){
const items = data.status.map((status: { value: boolean; }) =>{
staus.value === true;
})
return items;
}
Input
const data: [
{
name: "php",
status: [
{
value: "true"
},
{
value: "false"
}
]
},
{
name: "java",
status: [
{
value: "false"
},
{
value: "false"
}
]
}
]
Output
[
{
name: "php",
status: [
{
value: "true"
},
{
value: "false"
}
]
}
]
staus.value). Please always post the actual code.