# Converting the values of a dataset to a JSON string in WebDev

**URL:** <https://forum.inductiveautomation.com/t/converting-the-values-of-a-dataset-to-a-json-string-in-webdev/96448>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [September 25, 2024, 6:03pm UTC](https://forum.inductiveautomation.com/t/converting-the-values-of-a-dataset-to-a-json-string-in-webdev/96448 "2024-09-25T18:03:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nicoli.liedtke](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@nicoli.liedtke](https://forum.inductiveautomation.com/u/nicoli.liedtke)\
**Post date:** [September 25, 2024, 6:08pm UTC](https://forum.inductiveautomation.com/t/converting-the-values-of-a-dataset-to-a-json-string-in-webdev/96448/2 "2024-09-25T18:08:26Z")

</div>

You can put your own custom python into the WebDev module. You will want to return from the python resource a dictionary in the following format:

`return {"json": <JSON String>}`

You can make your own script for the Dataset to Json conversion or I found the following forum post with a solution.

> [@Dataset to simplified Json](https://forum.inductiveautomation.com/t/dataset-to-simplified-json/64156):
>
> We need to have a dataset converted to simplified JSON and the JSON must be written to a tag in the tag database. Also need to update the unicode to quotations. I was trying to save to a document tag. the code I have so far. tagpath = ("[default]path/memorytag") data1 = system.tag.readBlocking(["[default]path/table"])[0].value # convert the incoming value data pyDataset = system.dataset.toPyDataSet(data1) columns = system.dataset.getColumnHeaders(pyDataset) data = [] for row i…

---

_[View the full topic](https://forum.inductiveautomation.com/t/converting-the-values-of-a-dataset-to-a-json-string-in-webdev/96448)._
