Table of Contents

Search

  1. Preface
  2. The Transformation Language
  3. Constants
  4. Operators
  5. Variables
  6. Dates
  7. Functions

Transformation Language Reference

Transformation Language Reference

MAP_KEYS

MAP_KEYS

Returns an array of key elements for the specified map.

Syntax

MAP_KEYS(map as MAP)
The following table describes the arguments for this command:
Argument
Required/Optional
Description
map
Required
Map data type. Map with key-value pair elements from which you want to retrieve the keys. You can enter any valid transformation expression.

Return Value

Array.
The data type of keys determines the data type of the array elements. For example, if the key is of string type, the function generates array data with string elements.
Returns -1 if the map key is null.
Returns NULL if the map is null.

Examples

The following expression generates an array with elements of string type.
MAP_KEYS(stock_sellprice)
stock_sellprice
RETURN VALUE
[AAPL -> 150.45, GOOGL -> 1150.96]
[AAPL, GOOGL]
[AMZN -> 1400.54, TSLA -> 339.63]
[AMZN, TSLA]

0 COMMENTS

We’d like to hear from you!