// To parse this JSON data, do // // final specialtyData = specialtyDataFromJson(jsonString); import 'dart:convert'; SpecialtyData specialtyDataFromJson(String str) => SpecialtyData.fromJson(json.decode(str)); String specialtyDataToJson(SpecialtyData data) => json.encode(data.toJson()); class SpecialtyData { List>> data; SpecialtyData({ required this.data, }); factory SpecialtyData.fromJson(Map json) => SpecialtyData( data: List>>.from(json["data"].map((x) => Map.from(x).map((k, v) => MapEntry>(k, List.from(v.map((x) => Specialty.fromJson(x))))))), ); Map toJson() => { "data": List.from(data.map((x) => Map.from(x).map((k, v) => MapEntry( k, List.from(v.map((x) => x.toJson())))))), }; } class Specialtyresp { List data; Specialtyresp({ required this.data, }); factory Specialtyresp.fromJson(Map json) => Specialtyresp( data: List.from( json["data"].map((x) => Specialty.fromJson(x))), ); Map toJson() => { "data": List.from(data.map((x) => x.toJson())), }; } class Specialty { String specialtyCount; String specialtyName; Specialty({ required this.specialtyCount, required this.specialtyName, }); factory Specialty.fromJson(Map json) => Specialty( specialtyCount: json["specialty_count"], specialtyName: json["specialty_name"], ); Map toJson() => { "specialty_count": specialtyCount, "specialty_name": specialtyName, }; }