I got it..Finally. Although I dont think I understood, but i got a working solution.
msg.payload is passed on to the template node and dynamically the table is built and displayed on the dashboard, as I was expecting.
Thanks for keeping me motivated.