title: Converting a json schema to angular-tree-control treemodel
body: <p>I have a very large <a href="http://json-schema.org/" rel="nofollow">json schema</a> which I would like to display in an <a href="https://github.com/wix/angular-tree-control" rel="nofollow">Angular Tree Control</a>. However, the json schema is not exactly in the treemodel format supported by the Angular Tree Control. For example, the children (properties) in the schema are not in an array. How would I go about converting the json schema into a treemodel format?</p>
  
  <p>The schema looks something like this (except more complicated with up to 10 levels of nesting):</p>
  
  <pre><code>{
      "type": "object",
      "properties": {
          "firstName": {
              "type": "string"
          },
          "lastName": {
              "type": "string"
          },
          "address": {
              "type": "object",
               "properties": {
                   "addressLine1": {
                        "type": "string"
                    },
                    "addressLine2": {
                         "type": "string"
                    }
               }
           }
       }
   }
  </code></pre>
  
  <p>For it to render correctly in the Angular Tree Control, it needs to look like this:</p>
  
  <pre><code>{
          "type": "object",
          "properties": [
              {
                  "name": "firstName",
                  "type": "string"
              },
              {
                  "name": "lastName",
                  "type": "string"
              },
              {
                  "name": "address",
                  "type": "object",
                  "properties": [
                        {
                            "name": "addressLine1",
                            "type": "string"
                        },
                        {
                             "name": "addressLine2",
                             "type": "string"
                        }
                  ]
              }
          ]
      }
  </code></pre>