Table editor by Stefano Verna

@stefano.verna I am using your plugin for tabular data Table Editor - Plugins - DatoCMS.

Do you have or can suggest any useful utility on the front end (JS/react) to render the JSON field as a HTML table?

Thanks,
Primoz

Hello @primoz.rome

I’m not sure this is in the lines of a recommendation that Stefano would give, but there are some packages on NPM that serve that exact purpose, like this one for example: react-json-to-table - npm that does exactly that with some minor adjustments to the JSON :slight_smile:

1 Like

Thanks @m.finamor. I will give it a try!

1 Like

Looks like the proposed react-json-to-table - npm package has problems with Next.js…

./node_modules/react-json-to-table/build/lib/components/JsonToTable/JsonToTable.css
Global CSS cannot be imported from within node_modules.
Read more: https://nextjs.org/docs/messages/css-npm
Location: node_modules/react-json-to-table/build/lib/components/JsonToTable/JsonToTable.js

I think directly installing Global CSS would mitigate that problem, but anyway, there are some other options, such as
Doing it with a simple mapping on your own: How to parse JSON Data into React Table Component ? - GeeksforGeeks
Or also some other similar packages: https://www.npmjs.com/package/react-json-table-v2