hash( key1, value1 [, key2, value2 [, ... ] ] )
Name | Type | Description | Required |
---|---|---|---|
key1 | string | The key of value1. | Yes. |
value1 | any | The value associated with key1. | Yes. |
key2 | string | The key of value2. | No. |
value2 | any | The value associated with key2. | No. |
This operator builds an associative array using the specified key/value pairs. Odd parameters are considered to be keys, even parameters will be values. The operator returns the generated hash.
{hash( 1, 'Red Eyes', 2, 'Green Gremlins', 3, 'Blue Thunder' )}
The following hash will be returned:
Key | Value |
---|---|
1 |
Red Eyes |
2 |
Green Gremlins |
3 |
Blue Thunder |