import 'dart:convert';

List<SimpleModel> simpleModelFromJson(String str) => List<SimpleModel>.from(json.decode(str).map((x) => SimpleModel.fromJson(x)));

String simpleModelToJson(List<SimpleModel> data) => json.encode(List<dynamic>.from(data.map((x) => x.toJson())));

class SimpleModel {
    String alertCode;
    int noofalerts;

    SimpleModel({
        required this.alertCode,
        required this.noofalerts,
    });

    factory SimpleModel.fromJson(Map<String, dynamic> json) => SimpleModel(
        alertCode: json["Alert_Code"],
        noofalerts: json["Noofalerts"],
    );

    Map<String, dynamic> toJson() => {
        "Alert_Code": alertCode,
        "Noofalerts": noofalerts,
    };
}
