Skip to content

Get Value By Key Name

Description

This operation returns a value associated with a key.

Method

GET

Endpoint URL

Important

Make sure to replace xxxx in the domain name in the request specification below to the one assigned to your application.

https://xxxx.backendless.app/api/hive/[hive-name]/map/[key]/get/[key-name]

where:

Argument                Description
[hive-name] Name of a hive where the operation is performed.
[key] Key name identifying a map.
[key-name] Key name identifying a key-value pair.

Request Headers

None.

Request Body

None.

Response Body

A JSON value associated with the specified key. If the key does not exist, then null is returned.

Example

The example below returns the value associated with the Oranges  key from the fruitsPrice map.

curl --location --request GET "https://xxxx.backendless.app/api/hive/groceryStore/map/fruitsPrice/get/Oranges"

where:

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

Response Example

0.99

Codeless Reference

map_api_get_value_by_key_name

where:

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

Returns a value associated with the specified key.

Consider the following Map storage:
map_apI_example_map_store_3

The example below retrieves a value of the key "Oranges" from the "fruitsPrice" map.

map_example_api_get_value_by_key_name

The logic produces the following output:

map_example_api_get_value_by_key_name_2