title: Jinja2 and Json
body: <p>I have for example a JSON File</p>
  
  <pre><code>{
      "Google":{
      "Web":"www.web.de",
      "Apps":{
          "Drive": "DriveLink",
          "Dropbox": "DropboxLink"
      },
      "Google Main":"http://mail.google.com",
      "G+":"http://plus.google.com"
      },  
      "Social":{
      "Facebook":"http://www.facebook.de",
      "G+":"https://plus.google.com",
      "Xing":"http://www.xing.de",
      "LinkedIn":"http://www.linkedin.com",
      "Tumblr":"http://www.tumblr.com"
      },
      "Fun":{
      "Reddit":"http://www.reddit.com"
      }
  }
  </code></pre>
  
  <p>As you can see I have under the section Google a Nested Section named Apps</p>
  
  <p>With CherryPy I hand over this JSON Object as following with the name linksList:</p>
  
  <pre><code>@cherrypy.expose
  def index(self):
      linksFile = open('links.json', 'r')
      linksList = json.load(linksFile) 
  
      template = jinjaEnv.get_template('index.html')
      return template.render(linksList=linksList)
  </code></pre>
  
  <p>What I want is to render following:</p>
  
  <ol>
  <li>Google
  <ul>
  <li>Web (as a link)</li>
  <li>Google Main</li>
  <li>G+</li>
  <li>Apps
  <ul>
  <li>Drive</li>
  <li>Dropbox</li>
  </ul></li>
  </ul></li>
  <li>Social
  <ul>
  <li>Facebook</li>
  <li>G+</li>
  <li>Xing </li>
  </ul></li>
  </ol>
  
  <p>and so on</p>
  
  <p>What I don't understand is to do is to render this nested Objects like "Apps" recursively</p>