def parse_entry(entry):
    """
    Parse a single entry in JSON format, mostly flattening it.
    """

    # Collect info for the root table
    root = {
        "root_id": entry["EGY_ROOT__ID"],
        "root_form": entry["EGY_ROOT__form"],
        "root_meaning_en": entry["EGY_ROOT__meaning_en"],
    }
    if entry["EGY_ROOT__TLA_ROOT"]:
        tla_root = list(entry["EGY_ROOT__TLA_ROOT"].values())[0]
        root["tla_root_id"] = tla_root["TLA_ROOT__ID"]
        root["tla_root_form"] = tla_root["TLA_ROOT__form"]
        root["tla_root_meaning_en"] = tla_root["TLA_ROOT__meaning_en"]
        root["tla_root_meaning_de"] = tla_root["TLA_ROOT__meaning_de"]
    else:
        root["tla_root_id"] = ""
        root["tla_root_form"] = ""
        root["tla_root_meaning_en"] = ""
        root["tla_root_meaning_de"] = ""

    # Collect info for the CCL table
    ccl = []
    for form in entry["CCL__forms"].values():
        ccl.append(form)

    # Collect info for the TLA table
    tla = []
    for form in entry["TLA__forms"].values():
        tla.append(form)

    # Collect matches
    matches = []
    for match in entry["MATCHES"].values():
        matches.append(match)

    return root, ccl, tla, matches