76
rated 0 times
[
81]
[
5]
/ answers: 1 / hits: 57281
/ 7 Years ago, fri, july 7, 2017, 12:00:00
I have object with several properties, says it's something like this
{ a: , b: undefined }
in jsx is there any one line solution I can check whether that object's property is not empty or has value or not? If array there's a isEmpty method.
I tried this
const somethingKeyIsnotEmpty = Object.keys((props.something, key, val) => {
return val[key] !== '' || val[key] !== undefined
})
More From » ecmascript-6