# Convert from JSON to markdown/html table

**URL:** https://community.glideapps.com/t/convert-from-json-to-markdown-html-table/69064
**Category:** Ask for Help
**Created:** [December 28, 2023, 2:26pm UTC](https://community.glideapps.com/t/convert-from-json-to-markdown-html-table/69064 "2023-12-28T14:26:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)
#### Post date: [December 28, 2023, 2:26pm UTC](https://community.glideapps.com/t/convert-from-json-to-markdown-html-table/69064/1 "2023-12-28T14:26:17Z")

</div>

I have data about a persons occupations in JSON and would like to convert this to a table - either in markdown or html.

Right now I use AI - but it would be nice to do it more directly and with greater control of the output.

The prompt I use for AI is

_Create a table layout using markdown._

_There should be 3 columns._  
_Heading for column 1 is Store_  
_Heading for column 2 is Title_  
_Heading for column 3 is Period_

_The values ​​in column 1 come from storeName_  
_The values ​​in column 2 come from jobShort_  
_The values ​​in column 3 come from the dataRange_

_dataRange must specify dates in the format DD.MM.YYYY. Present must be translated to Now_

_The values ​​come from the attached data file._

**Example data**

```auto
[
  {
    "storeName": "Dows",
    "jobShort": "Top boss",
    "dateRange": "Aug 2018 - Present",
    "location": "Copenhagen"
  },
  {
    "storeName": "MMs",
    "jobShort": "Head of money",
    "dateRange": "Jan 2013 - Present",
    "location": "Stockholm"
  },
  {
    "storeName": "KKS",
    "jobShort": "Head of Things",
    "dateRange": "Apr 2011 - Jul 2018",
    "location": "Oslo"
  }
]

```

---

<div class="post-metadata">

### Author: ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)
#### Post date: [December 28, 2023, 2:34pm UTC](https://community.glideapps.com/t/convert-from-json-to-markdown-html-table/69064/2 "2023-12-28T14:34:23Z")

</div>

Two ways I can think of to approach this:

- Use a JavaScript column to parse the JSON and output the HTML table. The dates would be a bit fiddly, but other than that it should be pretty straight forward. (ChatGPT would be able to help you).
- Use a series of Query JSON columns inside a Helper Table to pull the individual values, and then build the HTML with a Template and Joined List. Again, the dates would be a bit fiddly.

Now that I’ve typed that out, I think I’d favour the first option 😉
