def capture_fields_from_data(project_data, fields):
    """Extracts data for the given key list `fields` from a dict `project_data`."""
    output = {}
    for field in fields:
        try:
            field_data = project_data[field]
            if isinstance(field_data, list):  # handle `key: [value]`
                # assumes only the first list element is important
                field_data = field_data[0]
            output[field] = field_data
        except KeyError:
            output[field] = ""
    return output