Formatting UA Discussion #2

by jarosciak

HTML

<div id="tree"></div>
 <br><hr><br>
<div id="tree-sort"></div>

JavaScript

window.addEventListener('load', (event) => {

console.log("#############################################");




const comments = [
   {
      "_id": {
         "$oid": "5fea2f4f039fa5fc985bf471"
      },
      "body": [
         {
            "content": "I think "
         }
      ],
      "header": {
         "subject": "SUN and EARTH",
         "messageid": "A",
         "date": "2004-12-30T11:13:46-06:00",
         "from": [
            "Jozef Jarosciak"
         ],
         "references": [
            "A"
         ]
      }
   },
   {
      "_id": {
         "$oid": "5fea2f52039fa5fc985bf489"
      },
      "body": [
         {
            "content": "Their application"
         }
      ],
      "header": {
         "subject": "Re: SUN and EARTH",
         "messageid": "B",
         "date": "2004-12-30T16:46:22-05:00",
         "from": [
            "Greg Neill"
         ],
         "references": [
            "A"
         ]
      }
   },
   {
      "_id": {
         "$oid": "5fea2f52039fa5fc985bf489"
      },
      "body": [
         {
            "content": "Their application"
         }
      ],
      "header": {
         "subject": "Re: SUN and EARTH",
         "messageid": "C",
         "date": "2004-12-30T16:46:22-05:00",
         "from": [
            "Greg Neill"
         ],
         "references": [
            "B"
         ]
      }
   },
   {
      "_id": {
         "$oid": "5fea2f52039fa5fc985bf489"
      },
      "body": [
         {
            "content": "Their application"
         }
      ],
      "header": {
         "subject": "Re: SUN and EARTH",
         "messageid": "D",
         "date": "2004-12-30T16:46:22-05:00",
         "from": [
            "Greg Neill"
         ],
         "references": [
            "C"
         ]
      }
   },
   {
      "_id": {
         "$oid": "5fea2f52039fa5fc985bf489"
      },
      "body": [
         {
            "content": "Their application"
         }
      ],
      "header": {
         "subject": "Re:...