(key: string): any
(key: integer): any
(all: boolean): any
(arguments: {
all?: boolean,
key?: string | integer,
default?: any
}): anyThe _args operator gets a value from the arguments array passed to a function operator. The arguments array is an array of all the positional arguments passed to the function.
Arguments
string
If the _args operator is called with a string argument, the value of the key in the arguments array is returned. If the value is not found, null is returned. Dot notation and block list indexes are supported.
integer
If the _args operator is called with a integer argument, the value at that index in the arguments array is returned. If the value is not found, null is returned. Dot notation and block list indexes are supported.
boolean
If the _args operator is called with boolean argument true, the entire arguments array is returned.
object
all: boolean: Ifallis set totrue, the entireargumentsarray is returned. One ofallorkeyare required.key: string | integer: The value of the key or index in theargumentsarray is returned. If the value is not found,null, or the specified default value is returned. Dot notation and block list indexes are supported. One ofallorkeyare required.default: any: A value to return if thekeyis not found inarguments. By default,nullis returned if a value is not found.
Examples
Map over an array:
_array.map:
on:
- firstName: Ted
lastName: Mosby
- firstName: Robin
lastName: Scherbatsky
- firstName: Marshall
lastName: Eriksen
- firstName: Lily
lastName: Aldrin
- firstName: Barney
lastName: Stinson
callback:
_function:
__string.concat:
- __args: 0.firstName
- ' '
- __args: 0.lastNameReturns:
- Ted Mosby
- Robin Scherbatsky
- Marshall Eriksen
- Lily Aldrin
- Barney Stinson