handle third level of dictionary in dict_to_qs