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."
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