Length¶
Description¶
This operation counts the number of elements in the map and returns the total.
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]/length
where:
Argument | Description |
---|---|
[hive-name] |
Name of a hive where the operation is performed. |
[key] |
Key name identifying a map. |
Request Headers¶
None.
Request Body¶
None.
Response Body¶
The total number of items stored in the specified map.
Example¶
The example below returns the total number of items stored in the fruits
map.
curl --location --request GET "https://xxxx.backendless.app/api/hive/groceryStore/map/fruits/length"
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. |
Returns the total number of items stored in the specified map.
Consider the following Map storage:
The example below counts the number of values in the "fruits"
map:
The output will look as shown below after the Codeless logic runs.