working with JSON data array from Ajax response?

后端 未结 5 1685
一个人的身影
一个人的身影 2020-12-21 21:26

Is it possible to work with a response from AJAX request in PHP? I am not really a JS dev so i am polling my hair out with this one.

I have sort of hacked this toget

5条回答
  •  心在旅途
    2020-12-21 21:49

    Do like this.

    var data = $.parseJSON("your_json");
    var output= "
      "; for (i=0; i < data.payments.length; i++){ output += "
    • " + data.payments[i].id + ", " + data.payments[i].child_id + "
    • "; } output += "
    ";

提交回复
热议问题