For Example in one file
Test.js
var Test = {
String: "Test string"
};
I want to read in another js file like this:
Test.String should give me "Test String" as the output.
Any ideas will be good. Thanks
Modifying question a bit:
I am even not able to read a global variable declared in same file.
var Test = { String: "Test string" };
is in the same file.
How I am using it is in another variable.
"MyTest":{
"prop":{
MyVar: "Test.String"
}
}
So I am trying to print MyTest.prop.MyVar and expecting to get "Test String" but its giving Test.String as output