Question
· Dec 15, 2020

Using a variable to reference an object property

Anyone know if it's possible using cache objectscript (or something else maybe) to reference an object property using a variable? For example:

s obj={}

s obj.prop1="hello"

s var="prop1"

w obj.var    <== which would result in a reference to obj.prop1 and write out "hello"

Product version: Caché 2017.1
Discussion (7)1
Log in or sign up to continue