Having major problems with GroupBy as well.

Feb 15, 2014 at 4:26 PM
var inmates = [{
    "inmate_number": "990466",
    "first_name": "SOME",
    "last_name": "DUDE",
    "hall": "DSEG1",
    "cell": "1022",
    "bed": "",
    "age": "59",
    "book_datetime": "10\/16\/2010-11:53 PM",
    "release_datetime": "N\/A-N\/A",
    "arresting_agency": "NEWTON COUNTY SHERIFF'S OFFICE",
    "charges": [{
        "warrant_number": "TBI",
        "charge_type": "16-11-39",
        "charge_description": "DISORDERLY CONDUCT-",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "PROPERTY: 1000",
        "bond_2": "N\/A: 0.0",
        "sentence": ""
    }, {
        "warrant_number": "TBI",
        "charge_type": "16-10-24",
        "charge_description": "OBSTRUCTION OR HINDERING LAW-ENFORCEMENT OFFICERS.",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "PROPERTY: 1000",
        "bond_2": "N\/A: 0.0",
        "sentence": ""
    }, {
        "warrant_number": "TBI",
        "charge_type": "16-11-37",
        "charge_description": "TERRORISTIC THREATS AND ACTS.-",
        "charge_offence_type": "Felony",
        "bond_1": "PROPERTY: 1500",
        "bond_2": "N\/A: 0.0",
        "sentence": ""
    }, {
        "warrant_number": "TBI",
        "charge_type": "16-5-70",
        "charge_description": "CRUELTY TO CHILDREN. THIRD DEGREE.-",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "PROPERTY: 1000",
        "bond_2": "N\/A: 0.0",
        "sentence": ""
    }],
    "base64enc_photo": null
}, {
    "inmate_number": "992732",
    "first_name": "SOME",
    "last_name": "OTHERDUDE",
    "hall": "E-2",
    "cell": "1041",
    "bed": "",
    "age": "50",
    "book_datetime": "01\/23\/2014-04:16 AM",
    "release_datetime": "N\/A-N\/A",
    "arresting_agency": "NEWTON COUNTY SHERIFF'S OFFICE",
    "charges": [{
        "warrant_number": "12GPM1132",
        "charge_type": "42-8-38",
        "charge_description": "PROBATION VIOLATION NCSO ORG-GIVING FALSE INFO",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "N\/A: 0.0",
        "bond_2": "N\/A: 0.0",
        "sentence": "90 DAYS NCJ"
    }],
    "base64enc_photo": null
}, {
    "inmate_number": "994962",
    "first_name": "SOMEDUDE",
    "last_name": "WHOKILLEDSOMEONE",
    "hall": "FR",
    "cell": "FR",
    "bed": "",
    "age": "22",
    "book_datetime": "09\/25\/2013-03:22 PM",
    "release_datetime": "N\/A-N\/A",
    "arresting_agency": "NEWTON COUNTY SHERIFF'S OFFICE",
    "charges": [{
        "warrant_number": "B1309072",
        "charge_type": "40-8-76.1",
        "charge_description": "NO SEAT BELTS-",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "PROPERTY: 500",
        "bond_2": "N\/A: 0.0",
        "sentence": ""
    }, {
        "warrant_number": "B1309071",
        "charge_type": "40-6-391-1",
        "charge_description": "DRIVING UNDER THE INFLUENCE OF-ALCOHOL OR DRUGS - 1ST OFFENSE",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "PROPERTY: 1500",
        "bond_2": "N\/A: 0.0",
        "sentence": "OR BOND WITH MONITOR"
    }, {
        "warrant_number": "B1309071",
        "charge_type": "40-6-390",
        "charge_description": "RECKLESS DRIVING-",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "PROPERTY: 1500",
        "bond_2": "N\/A: 0.0",
        "sentence": ""
    }, {
        "warrant_number": "B1309071",
        "charge_type": "40-5-64-3",
        "charge_description": "LIMIITED LICENSE VIOLATION-",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "PROPERTY: 1500",
        "bond_2": "N\/A: 0.0",
        "sentence": ""
    }, {
        "warrant_number": "B1309072",
        "charge_type": "40-6-48",
        "charge_description": "IMPROPER LANE USAGE-",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "PROPERTY: 500",
        "bond_2": "N\/A: 0.0",
        "sentence": "OR BOND WITH MONITOR"
    }, {
        "warrant_number": "B1309072",
        "charge_type": "40-6-253",
        "charge_description": "OPEN CONTAINER-",
        "charge_offence_type": "Misdemeanor",
        "bond_1": "PROPERTY: 500",
        "bond_2": "N\/A: 0.0",
        "sentence": ""
    }, {
        "warrant_number": "B1309073",
        "charge_type": "40-6-393",
        "charge_description": "HOMICIDE BY VEHICLE-",
        "charge_offence_type": "Felony",
        "bond_1": "PROPERTY: 15000",
        "bond_2": "N\/A: 0.0",
        "sentence": "OR BOND WITH MONITOR"
    }],
    "base64enc_photo": null
}
];
I need to be able to GroupBy the inmates.charges.charge_type so I can get a count of each distinct charge in one big result. Unfortunately I can't find a single example of how to do this while traversing an array within an array within an array. Any help would be greatly appreciated.