import json


def get_profile(name, file):
    """
    :param name: profile name
    :param file: file name e.g. profiles.json
    :return: dict. profile with :param name at :param file
    """
    profile = {}
    with open(file) as f:
        data = json.load(f)
        for prof in data:
            if prof['name'] == name:
                profile['name'] = prof['name']
                profile['asana'] = prof['asana']
                profile['airtable'] = prof['airtable']
                break
    if not profile:
        return None
    return profile