JSFiddle - React, Tailwind, and code Playground
JavaScript
const test = [{
slug: 'asd'
}]
const asd = test.find(cat => cat.slug === 'test');
console.log( !!asd )
const test = [{
slug: 'asd'
}]
const asd = test.find(cat => cat.slug === 'test');
console.log( !!asd )