try{ var jsonStr='{}'; jsonObj=JSON.parse(jsonStr); var objectId =0; var level=0; var htmlStr="" htmlStr += ""; htmlStr += "
"; htmlStr += ""; htmlStr += ""; htmlStr += ""; htmlStr += "" + key + "\n"; htmlStr +="\n"; } htmlStr += tabs(level+1) + " |
" + key + "\n"; htmlStr+="\n"; } htmlStr += tabs(level+1) + " |
" +key + "[" + i + "]" + "\n"; htmlStr+="\n"; } htmlStr += tabs(level+1) + " |
Array\n"; htmlStr+="\n"; } htmlStr += tabs(level+1) + " |