mapListOfMapFromJson static method

List<Map<String, Object>> mapListOfMapFromJson(
  1. dynamic json
)

Implementation

static List<Map<String, Object>> mapListOfMapFromJson(dynamic json) {
  if (json is! List) {
    return [];
  }

  List<Map<String, Object>> result = [];

  for (var item in json) {
    if (item is Map<String, Object>) {
      result.add(item);
    }
  }

  return result;
}