I want to render data object in the body as a table with three columns
one for the key like "ASIANPAINT24JUN21FUT"and other two for the links
I don't have any experience with javascript, I tried using renderjson to render the
json object received, but it renders just plain text,
I want to render the object as a table, and the links in it should be clickable
How can I achieve this?
index.html
<body>
// render data object here
<script>
var eventSource = new EventSource("/listen")
eventSource.addEventListener("message", function(e) {
console.log(e.data)
}, false)
eventSource.addEventListener("online", function(e) {
let data = JSON.parse(e.data)
}, true)
</script>
</body>
data object
{
"ASIANPAINT24JUN21FUT": [
"https://in.tradingview.com/chart/?symbol=NSE:ASIANPAINT1!",
"https://kite.zerodha.com/chart/ext/tvc/NFO-OPT/ASIANPAINT21JUN2980CE/15044354"
],
"DEEPAKNTR24JUN21FUT": [
"https://in.tradingview.com/chart/?symbol=NSE:DEEPAKNTR1!",
"https://kite.zerodha.com/chart/ext/tvc/NFO-OPT/DEEPAKNTR21JUN1820CE/20372738"
],
"DRREDDY24JUN21FUT": [
"https://in.tradingview.com/chart/?symbol=NSE:DRREDDY1!",
"https://kite.zerodha.com/chart/ext/tvc/NFO-OPT/DRREDDY21JUN5350CE/20732162"
],
"ESCORTS24JUN21FUT": [
"https://in.tradingview.com/chart/?symbol=NSE:ESCORTS1!",
"https://kite.zerodha.com/chart/ext/tvc/NFO-OPT/ESCORTS21JUN1220CE/20892674"
]
}
