I'm mapping data from an eBay API pull, and trying to display an icon if the value equals true or nothing if false.
The field is called bestOfferEnabled and is either a value of 'true' or false.
This is example dataset https://pastebin.com/mqCscKss/
I'm trying this:
{item.listingInfo[0].bestOfferEnabled === true && (
<i className="fas fa-comment-dollar"></i>
)}
and it is not generating the icon. I've also tried various versions of this including true in quotes but nothing is working.
When i just try to output the text on the page doing this:
{item.listingInfo[0].bestOfferEnabled}
it does print out a true or false value