def trim_data(data, keys):
    """Subset fields returned from api response"""
    new_data = []
    for dictionary in data:
        new_data.append(
            dict((k, dictionary[k]) for k in keys if k in dictionary))
    return new_data