title: Recursive parsing of JSON object to construct HTML elements
body: <p>I'm attempting to build a set of HTML elements from a JSON object. I've managed to successfully construct the object from HTML elements, but the recursive rebuild keeps failing on me. Anyone have a good solution?</p>
  
  <p>My JSON:</p>
  
  <pre><code>{
      "0": {
          "id": "text-1",
          "tag": "div",
          "style": {
              "left": "92px",
              "top": "37px",
              "z-index": "3",
              "height": "19px",
              "width": "98px",
              "font-weight": "bold",
              "font-style": "italic",
              "font-size": "16px",
              "color": "rgb(255, 255, 255)"
          },
          "data": {},
          "children": {
              "0": {
                  "tag": "span",
                  "style": {},
                  "data": {},
                  "html": "This is a test.",
                  "text": "This is a test."
              }
          }
      },
      "1": {
          "id": "image-1",
          "tag": "div",
          "style": {
              "width": "100px",
              "height": "133px",
              "left": "91px",
              "top": "8px",
              "z-index": "1"
          },
          "data": {},
          "children": {
              "0": {
                  "tag": "img",
                  "style": {},
                  "data": {},
                  "html": "",
                  "text": "",
                  "src": "http://img2.etsystatic.com/000/0/6490841/il_570xN.351801334.jpg"
              }
          }
      },
      "2": {
          "id": "video-1",
          "tag": "div",
          "style": {
              "width": "100px",
              "height": "50px",
              "left": "5px",
              "top": "85px",
              "z-index": "2"
          },
          "data": {},
          "children": {
              "0": {
                  "tag": "a",
                  "style": {
                      "background-image": "url(http://placehold.it/100x50&amp;text=Video)",
                      "height": "100%",
                      "width": "100%",
                      "display": "block",
                      "background-position": "0% 0%",
                      "background-repeat": "no-repeat no-repeat"
                  },
                  "data": {},
                  "html": "",
                  "text": ""
              }
          }
      }
  }
  </code></pre>