def cmr_filter_json(search_results, request_type="application/x-hdfeos"):
    """
    Filter the CMR json response for desired data files

    Arguments
    ---------
    search_results: json response from CMR query

    Keyword arguments
    -----------------
    request_type: data type for reducing CMR query

    Returns
    -------
    producer_granule_ids: list of ICESat-2 granules
    granule_urls: list of ICESat-2 granule urls from NSIDC
    """
    #-- output list of granule ids and urls
    producer_granule_ids = []
    granule_urls = []
    #-- check that there are urls for request
    if ('feed' not in search_results) or ('entry' not in search_results['feed']):
        return (producer_granule_ids,granule_urls)
    #-- iterate over references and get cmr location
    for entry in search_results['feed']['entry']:
        producer_granule_ids.append(entry['producer_granule_id'])
        for link in entry['links']:
            if (link['type'] == request_type):
                granule_urls.append(link['href'])
                break
    #-- return the list of urls and granule ids
    return (producer_granule_ids,granule_urls)