How to append json array data to html table tbody

后端 未结 3 1096
迷失自我
迷失自我 2021-01-24 03:21

I am very new into jQuery and JSON. I need to parse a JSON of the following format so as to populate a html table tbody:

{\"response\":[[\"name0\",\"id0\",\"amt0         


        
3条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-24 03:47

    You can access the JSON structure wiht this Javascript expression:

    var matrix = {"response":[["name0","id0","amt0"],["name1","id1","amt1"]]};
    

    The j-th column of the i-th element is accessible with this:

    matrix.response[i][j]
    

提交回复
热议问题