title: Deserialize JSON list of dictionaries in javascript
body: <p>I'm using CherrPy and I have to make an AJAX connection to retrieve informations about a table.
  The python code is : </p>
  
  <pre><code>    @cherrypy.expose
  def projects(self):
      c = self.dbConnect()
      projects_list = list()
      projects_version_list = list()
  
      # Get every products
      c.execute('Select * from T_Projects')
      result = c.fetchall()
      for row in result:
  
          # Conversion ID to string
          id = self.b10to26(int(str(row).split(",")[0][1:]))
          if len(id)==1:
              id = "AA" + id
          elif len(id)==2:
              id = "A" + id
  
          # Parse db informations
          name = str(row).split("'")[1] 
          created = str(row).split(",")[2].split("'")[1]
  
          # Product in dict line
          dict = {"name" : name, "id" : id, "created" : created}
  
          # Get every product versions
          cmd = ('Select * from T_Projects_Versions where id_project="{}"').format(str(row).split(",")[0][1:])
          c.execute(cmd)
          versions = c.fetchall()
          for row_version in versions:
  
              # Get ID + Name
              id_version = self.b10to26(int(str(row_version).split(",")[1]))
              if len(id_version)==1:
                  id_version = "A" + id_version
              name = str(row_version).split("'")[1]
              created = str(row_version).split(",")[4].split("'")[1]
  
              # Product version dict line
              dict_version = {"name" : name, "id" : id_version, "created" : created}
  
              #Put in a list
              projects_version_list.append (dict_version)
          projects_list.append({"dict" : dict, "projects_version_list" : projects_version_list})
  
      cherrypy.response.headers["Content-Type"] = "application/json"
      return json.dumps(projects_list)
  </code></pre>
  
  <p>The Javascript/Jquery code is here :</p>
  
  <pre><code>for(var i = 0;i &lt; data.length; ++i) //for enumerating array
                  {
                       var obj = data[i];
                       for(var propName in obj) //for enumerating the properties of an object
                       {
                           var value = obj[propName];
                           $('#container').append("item : " + i + " : prop : " + propName + " : value : " + value);
                       }
                  }
  </code></pre>
  
  <p>And the output is :</p>
  
  <blockquote>
    <p>item : 0 : prop : dict : value : [object Object]item : 0 : prop : projects_version_list : value : [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] ...</p>
  </blockquote>
  
  <p>The javascript part just doesn't work. Do you have any suggestions ?</p>
  
  <p>Thanks !</p>
  
  <p>Servietsky</p>