I have a jQuery object that contains strings. I use it in many places with no problems.
The object (for example):
resources {
res1: "Resource 1",
res2: "Resource 2",
... etc ...
}
I use this object like this:
ctl.text(resources.res1);
This works fine, but now I need to use these string resources like:
options {
resources.res1: "Some string",
resources.res2: "Another string"
}
In the above code I get an error starting at .res1 stating that a : is expected. Since resources.res1 contains a string I thought this should be valid. How can I use resources.res1 when creating options {}?