How to give the table data in throught the http in node red dashboard using api call

How to provide JSON data for a table in a Node-RED dashboard using an API call within a template, I used an inject node and a function node where I supplied the JSON data. Then, I connected it to an HTTP input node, and finally to a template node containing my table."
image
IN function node:
msg.payload = {"desserts":[{"name":"Ice cream sandwich","calories":237,"fat":9,"carbs":37,"protein":4.3,"iron":1,"gluten":true},{"name":"Eclair","calories":262,"fat":16,"carbs":24,"protein":6,"iron":7,"gluten":true},{"name":"Cupcake","calories":305,"fat":3.7,"carbs":67,"protein":4.3,"iron":8,"gluten":false}]};

return msg;
this is my template node code

{{ isGroupOpen(item) ? '$expand' : '$next' }} {{ item.value ? 'Contains gluten' : 'Gluten free' }}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.