Fix sorting issue

TNL-952
separate each key value pair with a new line:
```
input_dict = {
    '1_2_1': '1',
    '1_2_2': '2',
    ...
}
```