Fixed converting JSON arrays into HTML tree