getJsonObject function
Extracts JsonObject from Data object
Implementation
Object? getJsonObject(Data data, bool debug) {
Object obj = data.obj;
if (obj is String) {
try {
return jsonDecode(obj);
} catch (e) {
printLog(
"Error in function getJsonObject: $e",
debug,
color: LogColor.red,
);
return null;
}
}
return obj;
}