You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/develop/use-json.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -203,6 +203,24 @@ interface Transaction {
203
203
204
204
:::image type="content" source="../images/create-json-console-output.png" alt-text="The console output from the previous script that shows the property values of the object.":::
205
205
206
+
### Export JSON with `fetch`
207
+
208
+
Much like importing data with `fetch`, you can send data from your workbook with a similar command. A `POST` command takes any stringified JSON data and sends it to the specified endpoint.
209
+
210
+
To see this in action, replace the `console.log(transactions);` line in the previous sample with the following code. This issues a `POST` command to a testing server, then reads the data back.
The previous sample assumes the table header values are consistent. If your table has variable columns, you'll need to create a generic JSON object. The following script shows a script that logs any table as JSON.
0 commit comments