Get Array Element Operator []
Returns an array element.
Syntax |
| |
|---|---|---|
Semantics | The operator The first element has the position 0.
| |
Substitutables |
| Can be any variable or object attribute having the type Array. |
| Can be any expression that evaluates to an integer. | |
|
It is not possible to use class operations as index function – only built-in action script language operations are allowed. | ||
Examples | Get a specific array element Input: an array of names
JSON
CODE
Result: name is Eliza. | |
Get the last array element Input: an array of names
JSON
CODE
Result: name is David. | ||
Get a property from a complex array element Input: a list of articles
JSON
CODE
Result: price is 64.50. | ||
Related Content
Related Pages:
Get Array Element Operator []
Returns an array element.select Statement
Selects array items by evaluating a boolean where-expression for each array element and optionally grouping it.Set Array Element Operator []
Set the value of an array element.