Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 214415

Re: Listing all attributes in a scriptable object

$
0
0

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 214415

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>