get key value pair from nested dictionary python