Script to Build Component Structure 8.0.4

I need help figuring out how to use some scripting to build property structures with JSON. For example in the exchange click to graph item, you need to build the following properties
{
“filters”: {
“endDate”: null,
“mode”: “realtime”,
“mostRecent”: {
“units”: “min”,
“value”: 5
},
“pollRate”: {
“units”: “min”,
“value”: 1
},
“startDate”: null,
“showOverlay”: false
},
“tags”: []
}

thanks

You’ll want to create a dictionary. See this page in the user manual.
https://docs.inductiveautomation.com/display/DOC80/Dictionaries

Once you have the structure you need, call system.util.jsonEncode to convert the dictionary to a json string.
https://docs.inductiveautomation.com/display/DOC80/system.util.jsonEncode