Retrieve the brand icon

JavaScript
const icon = brand.logos.find(({ type }) => type === 'icon')
JavaScript
const logoDark = brand.logos.find(({ type, theme }) => type === 'logo' && theme === 'dark')
JavaScript
const logoLight = brand.logos.find(({ type, theme }) => type === 'logo' && theme === 'light')

Retrieve the dark symbol

JavaScript
const symbolDark = brand.logos.find(({ type, theme }) => type === 'logo' && theme === 'dark')

Retrieve the light symbol

JavaScript
const symbolLight = brand.logos.find(({ type, theme }) => type === 'logo' && theme === 'light')

Retrieve a specific format

JavaScript
const file = logo.formats.find(({ format }) => format === 'svg')

Find a logo with the best format

JavaScript
const priorityList = ['svg', 'webp', 'png', 'jpeg', 'jpg']

const file = priorityList.find(priorityFormat =>
  logo.formats.some(({ format }) => format === priorityFormat)
)