dump dicts sorted by key