function json_to_map(json, map) {
    map || (map = new Map());
    for (let i = 0, entry; i < json.length; i++) {
        entry = json[i];
        map.set(entry[0], entry[1]);
    }
    return (/** @type {Map} */map
    );
}
@param {Array<Object>} json
@param {Map<IntermediateSearchResults>|KeystoreMap<IntermediateSearchResults>} map
@return {Map<IntermediateSearchResults>|KeystoreMap<IntermediateSearchResults>}