Get Value By Key Name¶
Description¶
This operation returns a value associated with a key.
Method¶
Backendless.Hive(hiveName).MapStore(keyName).get(key);
where:
Argument | Description |
---|---|
hiveName |
Name of a hive where the operation is performed. String value. |
keyName |
Key name identifying a map. String value. |
key |
Key name identifying a key-value pair. String value. |
Return Value¶
A 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.
Backendless.Hive("groceryStore").MapStore("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: