how to use json file in html code

前端 未结 3 1463
执笔经年
执笔经年 2020-11-28 03:47

I have json file mydata.json, and in this file is some json-encoded data.

I want obtain this data in file index.html and process this data

3条回答
  •  隐瞒了意图╮
    2020-11-28 04:01

    
    
    
    
    
    
    
    
    
    
    First Name Last Name Email Address City

    My JSON file:

    {
       "person": [
           {
               "firstName": "Clark",
               "lastName": "Kent",
               "job": "Reporter",
               "roll": 20
           },
           {
               "firstName": "Bruce",
               "lastName": "Wayne",
               "job": "Playboy",
               "roll": 30
           },
           {
               "firstName": "Peter",
               "lastName": "Parker",
               "job": "Photographer",
               "roll": 40
           }
       ]
    }
    

    I succeeded in integrating a JSON file to HTML table after working a day on it!!!

提交回复
热议问题