Skip to content

Get All Key-Values

Description

This operation returns all key-value pairs from a map.

Method

Backendless.Hive(hiveName).MapStore(keyName).get();

where:

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

Return Value

An object containing key-value pairs retrieved from the map.  If no items exist in the map, the returned  object is empty.

Example

The example below returns all key-value pairs from the "shoppingCart" map.

Backendless.Hive("marketplace").MapStore("shoppingCart").get();

where:

Argument                Description
"marketplace" Name of a hive where the operation is performed.
"shoppingCart" Key name identifying a map.

Response Example

{  
    "t-shirt": 10.99,  
    "shoes": 45.99  
}

Codeless Reference

codeless-get-key-values

where:

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

Returns an object containing key-value pairs retrieved from the map.

Consider the following Map storage:
map_apI_example_map_store

The example below retrieves all key-value pairs from the "fruits" map.

map_api_example_get_all_key_values

The logic produces the following output:

get-all-keys-values-output