Loop inside JSONArray to display it inside a document Generated with Generate Document Task

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
bhchemss
Established Member

Loop inside JSONArray to display it inside a document Generated with Generate Document Task

Jump to solution

Hi everyone,

I have a table as process variable ,I want to generate a document with Generate document task based on word template.

I tried with Aspose syntax :

<<variables.get["Array[0].prop1"] at least to get the first one but it didn't  work.

The documentation of Aspose usage was't clear, can anyone help with this please ?

Thank you

Regards

Chemss

1 Solution

Accepted Solutions
bhchemss
Established Member

Re: Loop inside JSONArray to display it inside a document Generated with Generate Document Task

Jump to solution

I made a workaround for this , I tried to put the each value of property in a single array and do a loop inside the array and display it in a list inside the document template with :

<<foreach [p in getVarName]>> <<[p]>> <</foreach>>

Hope this help someone !

Cheers

Chemss

2 Replies
bhchemss
Established Member

Re: Loop inside JSONArray to display it inside a document Generated with Generate Document Task

Jump to solution

I made a workaround for this , I tried to put the each value of property in a single array and do a loop inside the array and display it in a list inside the document template with :

<<foreach [p in getVarName]>> <<[p]>> <</foreach>>

Hope this help someone !

Cheers

Chemss

rachana
Member II

Re: Loop inside JSONArray to display it inside a document Generated with Generate Document Task

Jump to solution

Hi Ben,

I am trying to do the same.I am getting error Object serialization error as I am using javascript.

Please help me.