jsonArrTrim method
jsonArrTrim
Implementation
Future<int> jsonArrTrim(
String key, {
String path = '\$',
int start = 0,
int stop = 0,
}) async {
List<RespType<dynamic>>? result = await _runWithRetryNew(() async {
return (await RespCommandsTier1(_client!)
.jsonArrTrim(key: key, path: path, start: start, stop: stop))
.toArray()
.payload;
});
if (result != null && result.isNotEmpty) {
return result[0].payload as int;
} else {
throw Exception('jsonArrTrim: No elements in the result list');
}
}