Deepak β 15-39 Aug 27
Hi, I'm unble to discrible but i need something like this
insted of
country.currency.symbol
, i need country.USD.symbol
.
i want to have currency value and not as key beacuse every currency has different name in database.19 Replies
Unknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
this is the object that i need to access
@Timotius
Unknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
no inside currencies you see "PEN"
Unknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
this change for every country
so i can't hard code it
Unknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
here is my code
this gives me "PEN" but i want to go deeper and access symbol
Unknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
in the above example i have currency as key but i am looking for way that i can access the value of currency and not as key
if i do
PEN.symbol
it works but if i do currency.symbol
it says undefined
i don't know how to define this problem so i can google itUnknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
wait, i found the solution
console.log(country.currencies[currency].symbol);
πͺUnknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
i can't hard code pen. its different for every country for example for USA its USD
Unknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
π§
yes, problem is solve. 90% time it is solved as i explain it to others π
so your help count π
by the way, can i reach you future if you are active on discord
Unknown Userβ’3y ago
Message Not Public
Sign In & Join Server To View
okay, i willl just ask in reactiflux
thanks
This thread hasnβt had any activity in 12 hours, so itβs now locked.
Threads are closed automatically after 12 hours. If you have a followup question, you may want to reply to this thread so other members know they're related. https://discord.com/channels/102860784329052160/565213527673929729/1013110504186720317