Quantcast
Viewing all articles
Browse latest Browse all 185574

Re: Listing all attributes in a scriptable object

If it's a Properties type there is a 'keys' attribute:

var arrayOfKeys = propObj.keys;

 

 

If it's a plain old js object you can use a for loop:

 

var obj = {"key1":"value1","key2":"value2"};
var keys = [];
for (var key in obj) {     System.log(key+" : "+obj[key]);     keys.push(key);
}

Viewing all articles
Browse latest Browse all 185574

Trending Articles