Difference between revisions of "Array.$A()"

From ZCubes Wiki
Jump to navigation Jump to search
 
Line 9: Line 9:
  
  
e.g. DebugSelectorObjects.$A("attrs.x") where DebugSelectorObjects is an array of objects.
+
e.g.  
  
 
a=[{a:3,b:5},{a:45,b:43}];
 
a=[{a:3,b:5},{a:45,b:43}];
 +
 +
a is an array of objects.
  
 
a.$A("a")
 
a.$A("a")
  
 
3 45
 
3 45

Latest revision as of 07:56, 4 February 2020


Array.$A(attributename)

Assuming the array of objects, is a parameter string for an attribute (say attrs.x) and extracts that attribute for each array element object.


e.g.

a=[{a:3,b:5},{a:45,b:43}];

a is an array of objects.

a.$A("a")

3 45