Bootstrap table showing JSON data

前端 未结 3 534
耶瑟儿~
耶瑟儿~ 2021-01-16 05:14

I\'m running Bootstrap on my site, combined with a bootstrap plugin called Bootstrap Tables. It requests the data to be delivered as a JSON file.

I\'m having trouble

3条回答
  •  迷失自我
    2021-01-16 05:54

    As I cannot comment to your post, I'm writing here:

    The data.json should be an array. What I found in your test.json, test2.json, test3.json is that 'test.json is json object', 'test2.json is json object with array' and 'test3.json is single json array containing multiple objects'.

    According to the 'getting started section in bootstrap table', it expects json array with json objects. Try this modified data.json from pastebin.

            
    Item ID Creator Created

    Output: enter image description here

提交回复
热议问题