Is there a better way to select resources?

Hi,

I am using a lot of json resources in my fields so as to allow me to rapidly configure them for a range of different situations. The trouble is, I haven't been able to find a way to evaluate a key for the resources...

EG: In other languages, I might have done:

function getResource(key) {

return WatchUi.loadResource(Rez.JsonData[ key ]);

}

But that syntax won't work, so to avoid a big-arsed and ugly if / switch statement running for several pages, I have resorted to...

function getResource(key) {

return WatchUi.loadResource([Rez.JsonData.K0, Rez.JsonData.K1, Rez.JsonData.K2, ... ][key]);

}

I've had to try similar approaches with programmatically selecting symbols.

But...

THAT SEEMS LUDICROUS!

Is there really no way to evaluate a string to return a symbol or a resource?

G