from typing import List


def build_table_dict(entry_contexts: List[dict]) -> List[dict]:
    """ Create table from all retirieved entry context.

    Args:
        entry_contexts: List of entry contexts from command "cb-get-file-from-endpoint"

    Returns:
        list: filtered list with modified headers
    """
    table = []
    for ec in entry_contexts:

        table_entry = {}

        for file_ec in ec.values():
            for key, value in file_ec.items():
                if key == "FileID":
                    table_entry["File ID"] = value
                elif key == "OperandObject":
                    table_entry["File path"] = value

        table.append(table_entry)

    return table