I’ll be glad for any hint!
I have an array:
"languages": [
{
"languageId": 1,
"languageLevelId": 2
},
{
"languageId": 9,
"languageLevelId": 3
},
{
"languageId": 0,
"languageLevelId": 3
}
]
And constants:
export const LANGUAGE = {
UKRAINIAN: 0,
ENGLISH: 1,
CHINESE: 2,
SPANISH: 3,
ARABIC: 4,
JAPANESE: 5,
HINDUSTANI: 6,
FRENCH: 7,
GERMAN: 8,
RUSSIAN: 9,
PORTUGUESE: 10,
ITALIAN: 11
};
export const LANGUAGE_LEVEL = {
BEGINNER: 0,
INTERMEDIATE: 1,
ADVANCED: 2,
NATIVE: 3
};
How can I get something, like:
"languages": [
{
"languageId": ENGLISH,
"languageLevelId": ADVANCED
},
...
]
And then map languages, or what should I do in order to get such a result and get:
And then map languages, or what should I do in order to get such a result and get:
<div>English</div>
<div>Advanced</div>