Show HN: Send JSON Data directly to a table straight from your web app code

3 months ago 2

Convert JSON data directly from your web app's code into a styled, sortable table.


1. Copy the code snippet.


2. Modify const myData with your JSON data/object.


3. Paste the code into your existing app code!


4. Your JSON data will load in a table below.


(Only this browser session can see data sent to the id provided. Please do not send sensitive data.)

1// =========== JSONBason-DEV-use-only ===========

2const myData = 'your.JSONdata';

3fetch('https://jsonbason.com/api/json', {

4 method: 'POST',

5 headers: { 'Content-Type': 'application/json' },

6 body: JSON.stringify({ id: 'bmklAlLrxrcFQvcM1RX4', JSONdata: myData })

7})

8 .then(r => r.json()); console.log('Sent to JSONBason OK')

9 .catch(console.error);

DM


Welcome To JSONBason! Send some JSON data in and it will appear in a table here.

Read Entire Article