I have an array that looks like following
values = {de: true, en: false, nl: false, pl: false, ru: false}
I using the array to make a layout change in jsx, how can I check if the array has at least one true value in JSX,
any help would be appreciated.
Assuming that
values
is actually an object, check if.some
of theObject.values
of the object are true:(if the only truthy value is true, you can use
(val => val)
instead)