Convert JSON array to an HTML table in jQuery

前端 未结 15 1086
温柔的废话
温柔的废话 2020-11-22 16:33

Is there a really easy way I can take an array of JSON objects and turn it into an HTML table, excluding a few fields? Or am I going to have to do this manually?

15条回答
  •  温柔的废话
    2020-11-22 16:40

    If you accept using another jQuery dependent tool, I would recommend using Tabulator. Then you will not need to write HTML or any other DOM generating code, while maintaining great flexibility regarding the formatting and processing of the table data.

    For another working example using Node, you can look at the MMM-Tabulator demo project.

提交回复
热议问题