Temple attribute with list not created nicely

Hi @Taras have you looked at the other topic which I copied above, although not the exactly same it has similar odd output
Template query with array - Configuration - Home Assistant Community (home-assistant.io)