Hi i have the data like below,
data = [
{
attributes: [{key: '', value: ''}, {key: 'name1', value: ''}],
info: '',
meshes: [],
}
{
attributes: [{key: '', value: ''}, {key: '', value: ''}],
info: '',
meshes: [],
}
.....so on....
]
So from above data i want to check if each attributes has key and value empty or undefined. how can i check that. could someone help me with this. thanks.
data? Do you want a boolean result if any object in the array does not match your conditions?dataand check the object propertyattributes.undefinedare falsydata.every(x => x.every(a => a.key === '' && a.value === ''))