2021年1月22日星期五

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

https://stackoverflow.com/questions/65855041/return-certain-values-of-json-in-a-table-format January 23, 2021 at 10:07AM

没有评论:

发表评论