2

I need to assign to withdraw the name of a variable from a dynamic string.

Ex. Thats wright:

 Item.text = localizedStrings.report_label;

Thats wrong:

var localizedName = "localizedStrings.report_".concat(tempList[index].Name);
Item.text = localizedName;

Can someone tell me the way to do that??

1
  • of course, the secont part is inside a cycle for Commented Jan 18, 2016 at 8:44

1 Answer 1

1

try using bracket notation:-

var localizedName = localizedStrings["report_" + tempList[index].Name];
Item.text = localizedName;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.