Skip to main content
manavik105
Known Participant
Mar 15, 2026 9:45 PM UTC
Question

How to convert list of data/dictionary to json data

Hi All, I'm trying to pass Json type data input (which is a rule from my interface sending it to process model via start process) to JsonToExcel Smart Service. I need the output format as below. Please advise.

expected sample output format - = "[{ ""startPublicationDate"": ""2021-09-05"",""endPublicationDate"": ""2021-09-05""   }]"

The challenge I see here is my rule has nested rules inside it and output is a list of dictionary. 

5 replies

revathis772076
Participating Frequently
Mar 16, 2026 3:34 PM UTC

Try a!toJson to convert json.

stefanhelzle0001
Brainy
Mar 16, 2026 4:16 PM UTC

Did you test a!toJson? If yes, do you see any issues?

shubhama926776
Brainy
Mar 17, 2026 5:11 AM UTC
nandhakums961772
Participating Frequently
Mar 18, 2026 4:41 PM UTC

Hi Dusty, I see you already posted a similar question. Please do refer to that.

Thread Link: https://community.appian.com/discussions/f/process/40278/how-to-convert-below-rule-data-to-json-data

Friendly Neighbourhood Developer
garyr582173
Participating Frequently
Nov 5, 2026 10:53 AM UTC

The simplest approach is to convert the dictionary list into a JSON string before passing it to the JsonToExcel Smart Service. In Appian, use the a!toJson() function on the final list of dictionaries rather than converting each nested rule separately. Make sure the nested rules return properly structured Appian values and that the date fields are formatted as strings in yyyy-MM-dd format.

If your rule returns a DataSubset, access its actual list using .data before conversion, for example a!toJson(local!data.data). This will preserve the nested structure and generate the required JSON array. Pass the resulting text directly to the Smart Service's JSON input.