def retreive_details(input_dict,keys_to_extract):
    """
    Retreive specific keys from a dictionary object
    
    This function searches through a dictionary, and
    retreives keys that match keys from a list. This function 
    will find matching keys in every level of the dictionary heirarchy.
    
    Inputs:
    input_dict      -  A dictionary (expected to be from json.loads() 
                       in the context of BetterReads, but the function
                       will work on any dictionary).
    keys_to_extract -  A list of keys that you want to extract from the 
                       json_dict object.
                       
    Output:
    new_dict        -  A new "flattened"dictionary with all the matching keys. 
                       All the keys are in the top level.
    """
    
    new_dict={}
    for item in input_dict.keys():
        if type(input_dict[item]) is dict:
            temp_dict = retreive_details(input_dict[item],keys_to_extract)
            new_dict.update(temp_dict)
        if item in keys_to_extract:
            new_dict[item] = input_dict[item] 
    return new_dict