jsonArrAppend method
------------------------------ json ------------------------------ https://redis.io/docs/latest/develop/data-types/json/ jsonArrAppend
Implementation
/// jsonArrAppend
Future<int> jsonArrAppend(String key, Object value,
{String path = '\$'}) async {
Object result = await _runWithRetryNew(() async {
return (await RespCommandsTier1(_client!)
.jsonArrAppend(key: key, path: path, value: value));
});
if (result is RespType2<dynamic>) {
final result1 = result.toArray().payload;
if (result1 != null && result1.isNotEmpty) {
return result1[0].payload as int;
} else {
throw Exception('jsonArrAppend: No elements in the result list');
}
}
final result1 = (result as RespType3<dynamic>).toArray().payload;
if (result1 != null && result1.isNotEmpty) {
return result1[0].payload as int;
} else {
throw Exception('jsonArrAppend: No elements in the result list');
}
}