title: convert JavaScript nested array for priming tree format
body: <p>i have following JAVASCRIPT OBJECT and i need to convert it to primeng tree format , please help</p>
  
  <p>INPUT</p>
  
  <pre><code>    {
      "com": {
          "ups": {
              "demo": {
                  "a": 9
              }
          }
      }
  }
  </code></pre>
  
  <p>OUTPUT expected</p>
  
  <pre><code>[
          {
              "label": "COM",
              "data": "COM",
  
              "children": [{
                      "label": "ABC",
                      "data": "abc",
  
                      "children": [ "label": "x" data": "x" ,children:[]]
  
  
                  }]
  }]
  </code></pre>