@Azurin4848484 You need to use the above as inline code for the example that Sedat has shared. If you don't want to use the inline query, then you need to use loop to iterate it and build your custom HTML string by using append to variable.
Alternative you can also offload this functionality to a function app callling it from logic app that would have your custom logic to build the required string as per your business need.