JSFiddle - React, Tailwind, and code Playground
by luka kupunia
JavaScript
const obj = [
{name: 'luka'},
{name: 'mariami'},
{name: null}
]
const filt = obj.find(el => Boolean(el.name))
console.log(filt)
by luka kupunia
const obj = [
{name: 'luka'},
{name: 'mariami'},
{name: null}
]
const filt = obj.find(el => Boolean(el.name))
console.log(filt)