Length¶
Description¶
This operation counts the number of elements in the map and returns the total.
Method¶
Backendless.Hive(hiveName).MapStore(keyName).length(): Promise<number>;
where:
| Argument | Description |
|---|---|
hiveName |
Name of a hive where the operation is performed. String value. |
keyName |
Key name identifying a map. String value. |
Return Value¶
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.
await Backendless.Hive('groceryStore').MapStore('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.