jsonStrLen method

Future jsonStrLen({
  1. required String key,
  2. String path = r'$',
})

JSON.STRLEN key path

Reports the length of the JSON string at path.

key The key to check. path The JSON path. Defaults to root ($).

Returns an integer (length) or null if the target is not a string.

Implementation

Future<dynamic> jsonStrLen({
  required String key,
  String path = r'$',
}) async {
  final result = await execute(<String>['JSON.STRLEN', key, path]);
  return JsonHelpers.unwrapOne(result);
}