Check If Exists¶
Description¶
This operation verifies if a specific key exists in the specified map.
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]/exists/[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¶
true
if an object exists. Otherwise, returns false
.
Example¶
The example below checks if the Oranges
key exists in the fruits
map.
curl --location --request GET "https://xxxx.backendless.app/api/hive/groceryStore/map/fruits/exists/Oranges"
where:
Argument | Description |
---|---|
groceryStore |
Name of a hive where the operation is performed. |
fruits |
Key name identifying a map. |
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 true
if an object exists. Otherwise, returns false
.
Consider the following Map storage:
The example below checks if a key-value pair with the key name "Oranges"
exists in the "fruits"
map.
The logic produces the following output: