$.ajax({ async: false, type: \"POST\", url: url+\"module/listing/\"+projectId, data: \"ajax=true\", success: function(response) { $.each(resp
Use dataType: "json" to have jQuery parse the response as JSON. It will solve your problem.
dataType: "json"