FINALLLYY!!
I got it.
[{"id":"51b9fd27d56a03e7","type":"inject","z":"3a20af9f0b232322","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"ttpp","payload":"[{\"FROM\":\"2024-10-28 21:59\",\"To\":\"2024-10-28 22:22\",\"DUR\":23,\"mcn\":\"m00\",\"state\":\"OFF\"},{\"FROM\":\"2024-10-28 22:22\",\"To\":\"2024-10-28 22:23\",\"DUR\":1,\"mcn\":\"m01\",\"state\":\"ON\"},{\"FROM\":\"2024-10-28 22:23\",\"To\":\"2024-10-28 22:52\",\"DUR\":29,\"mcn\":\"m02\",\"state\":\"OFF\"},{\"FROM\":\"2024-10-28 22:52\",\"To\":\"2024-10-28 22:53\",\"DUR\":1,\"mcn\":\"m03\",\"state\":\"ON\"},{\"FROM\":\"2024-10-28 22:53\",\"To\":\"2024-10-28 23:38\",\"DUR\":85,\"mcn\":\"m03\",\"state\":\"OFF\"},{\"FROM\":\"2024-10-28 23:38\",\"To\":\"2024-10-28 23:41\",\"DUR\":3,\"mcn\":\"m03\",\"state\":\"ON\"},{\"FROM\":\"2024-10-28 23:41\",\"To\":\"2024-10-28 23:42\",\"DUR\":1,\"mcn\":\"m03\",\"state\":\"OFF\"},{\"FROM\":\"2024-10-28 23:42\",\"To\":\"2024-10-28 23:43\",\"DUR\":1,\"mcn\":\"m03\",\"state\":\"ON\"},{\"FROM\":\"2024-10-28 23:43\",\"To\":\"2024-10-28 23:45\",\"DUR\":2,\"mcn\":\"m03\",\"state\":\"OFF\"},{\"FROM\":\"2024-10-28 23:45\",\"To\":\"2024-10-28 23:47\",\"DUR\":2,\"mcn\":\"m03\",\"state\":\"ON\"}]","payloadType":"json","x":280,"y":2440,"wires":[["33c4e4ab36e1f0d8","9f46f315ad82a2bd"]]},{"id":"33c4e4ab36e1f0d8","type":"change","z":"3a20af9f0b232322","name":"data in payload","rules":[{"t":"set","p":"topic","pt":"msg","to":"This is the topic","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":2440,"wires":[["cf9dfd82a71cb956"]]},{"id":"cf9dfd82a71cb956","type":"json","z":"3a20af9f0b232322","name":"","property":"payload","action":"","pretty":false,"x":620,"y":2440,"wires":[["0571fb3490350b31"]]},{"id":"0571fb3490350b31","type":"template","z":"3a20af9f0b232322","name":"ONOFF TABLE (dynamic array)","field":"template","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js\"></script>\n\n<div>\n\tTABLE-2\n</div>\n\n<table border = \"solid white 1px\" border-collapse = \"collapse\" >\n \n\t<tr><td colspan =\"100%\">THIS DATA IS GENERATED FROM AN ARRAY HARDCODED INTO TEMPLATE NODE</td></tr>\n <tr><td colspan =\"100%\"></td></tr> \n\n\t<tr bgcolor = 'red'>\n <th>Machine</th>\n <th>Start-Time</th>\n <th>End-Time</th>\n <th>Duration</th>\n <th>Status</th>\n </tr>\n\n <tbody id=\"myTable\">\n \n </tbody>\n</table>\n\n\n<script>\n\t\nvar myArray = {{{payload}}}\n\n\n\tbuildTable(myArray)\n\n\tfunction buildTable(data){\n\t\tvar table = document.getElementById('myTable')\n\n\t\tfor (var i = 0; i < data.length; i++){\n\t\t\tvar row = `<tr>\n\t\t\t\t\t\t\t<td>${data[i].mcn}</td>\n\t\t\t\t\t\t\t<td>${data[i].FROM}</td>\n\t\t\t\t\t\t\t<td>${data[i].To}</td>\n\t\t\t\t\t\t\t<td>${data[i].DUR}</td>\n\t\t\t\t\t\t\t<td>${data[i].state}</td>\n\t\t\t\t\t </tr>`\n\t\t\ttable.innerHTML += row\n\t\t}\n\t}\n\n</script>","output":"str","x":840,"y":2440,"wires":[["937d37fbc75541b3","37c92c76d05fe2ed"]]},{"id":"937d37fbc75541b3","type":"ui_template","z":"3a20af9f0b232322","group":"9058f7c982a1dcc7","name":"","order":10,"width":"20","height":"20","format":"","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","className":"","x":1070,"y":2440,"wires":[[]]},{"id":"9058f7c982a1dcc7","type":"ui_group","name":"Demo3","tab":"6c38d6937a4ace93","order":4,"disp":false,"width":"20","collapse":false,"className":""},{"id":"6c38d6937a4ace93","type":"ui_tab","name":"Demo","icon":"dashboard","order":3,"disabled":false,"hidden":false}]