def parse_refs_json(data):
    """ Function to parse the json response from the references collection
    in Solr. It returns the results as a list with the annotation and details.
    """
    # docs contains annotation, fileName, details, id generated by Solr
    docs = data['response']['docs']
    # Create a list object for the results with annotation and details. Details is a list of 
    # a single string, flatten it: remove the string from the list.
    results = [[docs[i].get('annotation'), docs[i].get('details')[0]]
                      for i in range(len(data['response']['docs']))]
    #results = [result[0] for result in results]
    return results