Get All Keys Names¶
Description¶
This operation returns all key names from a map.
Method¶
[[[Backendless.shared hive:(NSString *)hiveName] mapStore:(NSString *)keyName] keysWithResponseHandler:^(NSArray<NSString *> *)responseHandler errorHandler:^(Fault *)errorHandler];
Backendless.shared.hive(hiveName: String).mapStore(keyName: String).keys(responseHandler: (([String]) -> Void)!, errorHandler: ((Fault) -> Void)!)
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¶
An array consisting of key names as string values. If the map does not contain any keys, then an empty array is returned.
Example¶
The example below returns all keys from "fruits"
map.
[[[Backendless.shared hive:@"groceryStore"] mapStore:@"fruits"] keysWithResponseHandler:^(NSArray *response) {
// handle response
} errorHandler:^(Fault *fault) {
// handle error
}];
Backendless.shared.hive("groceryStore").mapStore("fruits").keys(responseHandler: { response in
// handle response
}, errorHandler: { fault in
// handle error
})
where:
Argument | Description |
---|---|
"groceryStore" |
Name of a hive where the operation is performed. |
"fruits" |
Key name identifying a map. |
Response Example
[
"Oranges",
"Apples",
"Grapes"
]
Codeless Reference¶
where:
Argument | Description |
---|---|
hive name |
Name of a hive where the operation is performed. |
key name |
Key name identifying a map. |
Returns a list consisting of key names as string values.
Consider the following Map storage:
The example below gets all keys from the "fruits"
map:
The logic produces the following output: