getJsonField function
Implementation
dynamic getJsonField(dynamic response, String jsonPath) {
final field = JsonPath(jsonPath).read(response);
return field.isNotEmpty
? field.length > 1
? field.map((f) => f.value).toList()
: field.first.value
: null;
}