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¶
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:
The example below retrieves a value of the key "Oranges"
from the "fruitsPrice"
map.
The logic produces the following output: