TypeError: invalid 'in' operand obj in jquery 1.9.1 version

后端 未结 7 2954
走了就别回头了
走了就别回头了 2021-02-20 16:25
$.ajax({
    async: false,
    type: \"POST\",
    url: url+\"module/listing/\"+projectId,
    data: \"ajax=true\",
    success: function(response) {
        $.each(resp         


        
7条回答
  •  余生分开走
    2021-02-20 16:52

    Try this one, worked for me

    $.each(eval(response), function(key, val)
    

    For some reason (which I don't know), response is considered a string and not an object so you have to 'convert it' using eval().

提交回复
热议问题