def parse_row(row, fields):
    """Returns a well-formed JSON row containing interesting fields."""
    output = {}
    for index, field_name in fields.items():
        output[field_name] = row[index]
    return output