This code is able to fetch and display JSON data but it also shows "undefined" after showing numbers, i want it to show only numbers/prices and not show "undefined" at all. thanks.
<! DOCTYPE html>
<html lang="eng">
<head>
<title> </title>
</head>
</head>
<style>
body {
padding-left: 20px;
padding-top: 10;
}
</style>
<body>
<div id="output">
</div>
<script>
const pricesWs = new WebSocket('wss://ws.coincap.io/prices?assets=ALL')
pricesWs.onmessage = function(msg) {
console.log(msg.data);
var obj = JSON.parse(msg.data);
document.getElementById("output").innerHTML = '<ol style="font-size:17px;font-family:Arial">' +
'<li>Bitcoin  <b>-BTC-</b>' + obj.bitcoin + '</li><br><br>' +
'<li>Ethereum  <b>-BTC-</b>' + obj.ethereum + '</li><br><br>' +
'<li>Litecoin  <b>-BTC-</b>' + obj.litecoin + '</li><br><br>' +
'</ol>';
};
</script>
</body>
</html>