Skip to content

Get Key Items

Description

This operation returns all values from the specified set.

Method

Backendless.Hive(hiveName).SetStore(keyName).get(): Promise<values[]>;

where:

Argument                Description
hiveName Name of a hive where the operation is performed. String value.
keyName Key name identifying a set. String value.

Return Value

An array containing set's values. Each individual value is of any data type. Otherwise, returns an empty response body if the specified key does not exist.

Example

The example below returns all values from the 'cars' set.

await Backendless.Hive('transport').SetStore('cars').get()

where:

Argument                Description
'transport' Name of a hive where the operation is performed.
'cars' Key name identifying a set.

Codeless Reference
set_api_get_key_items

where:

Argument                Description
hive name Name of a hive where the operation is performed.
key name Key name identifying a set.

Returns a list containing set's values.

Consider the following Set storage:
set_api_example_all_blocks

The example below retrieves all items from the "cars" set:

set_api_example_get_key_items

The logic produces the following output:

set_api_example_get_key_items_2