HOW TO convert JSON to HTML table

The beautiful infographic listing a key summary of Azure Services is enabled by data from a JSON file

Looking at that JSON file I wondered if that data could be presented as a HTML table with only specific info that I wanted.

I found that there is a readymade service as well as programmatic ways to parse the JSON & transform into an HTML table. I discovered that the JSON2HTML open source JavaScript library that uses JSON templates to convert JSON objects into HTML simplifies this task

With a lot of help from StackOverflow, I put together a code sample (view page source for the code) that can read multiple arrays within JSON - [{items: [{ }], },{ items: [{ }],},...]  ....and present the values in a tabular format. View the output - an Azure Services quick reference

Comments

  1. You can also use https://yamlonline.com/ for the yaml validator as well as yaml converter to json,csv,xml,base64 also for beautify and minify YAML.

    ReplyDelete

Post a Comment