Generate unordered list from JSON Data?

后端 未结 3 2081
予麋鹿
予麋鹿 2020-12-08 11:53

I\'d like to generate a tree view of my JSON data. Therefore it would be nice to parse the JSON data into a multi-level (!) unordered HTML list

3条回答
  •  庸人自扰
    2020-12-08 12:24

    Have you tried using PHP and json_decode();

    http://php.net/manual/en/function.json-decode.php

    This would return your JSON string as an array in PHP and you can then loop through the array to create your UL > LI list.

    Just an idea..

提交回复
热议问题