Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
8.3k views
in Technique[技术] by (71.8m points)

javascript - Return certain values of json in a table format

So I am using ejs, and want to render specific values of my json in the following formats: The desired outcome would be in order: icon | filter 1 name | category name all side by side

Best approach here?

Copy of my json is below:

{
   "urls":{
      “Url1”:{
         "status":200
      }
   },
   “Filter1”:[
      {
         "slug”:”slug1,
         "name”:”name1”,
         "confidence":100,
         "version":null,
         "icon”:”icon1”,
         "website”:”website1”,
         "cpe":"cpe1”,
         "categories":[
            {
               "id":22,
               "slug”:”slug2”,
               "name”:”name3”
            }
         ]
      },
      {
         "slug”:”slug3”,
         "name”:”name4”,
         "confidence":100,
         "version":null,
         "icon”:”icon2”,
         "website”:”website2”,
         "cpe":null,
         "categories":[
            {
               "id":30,
               "slug”:”slug4”,
               "name”:”name5”
            },
            {
               "id":75,
               "slug”:”slug5”,
               "name”:”name6”
            }
         ]
      }
   ]
}

Here is a copy of what I want the output to look like

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神解答

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...