JSFiddle - React, Tailwind, and code Playground
by michapixel
JavaScript
let translations = {
en: {
icon: `🇬🇧`,
pages: {
home: {
title: `welcome`,
},
}
},
de: {
icon: `🇩🇪`,
pages: {
home: {
title: `willkommen`
}
}
},
};
let icons = Object.keys(translations).forEach((lang) => {
return translations[lang].icon;
});
console.log(icons)