When I execute the line
let X = this.appGlobal.GetNavigationLanguage().data;
, it returns JSON data as shown below.
https://i.sstatic.net/wdT4e.png
I am trying to extract the string NAV.REPORTS.BMAIL.TITLE.
The translation code (NAV.REPORTS.BMAIL.TITLE) is generated dynamically.
X.NAV.REPORTS.BMAIL.TITLE
=> works
=> worksX['NAV']['REPORTS']['BMAIL']['TITLE']
However, since the translation code is created dynamically, I need a method like the following:
let transCode = 'NAV.REPORTS.BMAIL.TITLE';
console.log(X[transCode]);
How can I accomplish this task?