0

I am working on a project in react native. I need to put variable in object path.

code1

code2

{globalDegerler.systemText.tr.welcomeMsg}
{globalDegerler.systemText    {checkLanguage}   welcomeMsg}

I keep the variable of the selected language in the system. How can I add this to the object path?

Can I add a variable I want instead of variable in the code2 photo?

1 Answers1

1

I think maybe what you want to do is this:

{globalDegerler.systemText[checkLanguage].welcomeMsg}

RamaProg
  • 1,106
  • 7
  • 15