Foreach in reporting engine with Text suffix

I have the following json

{
   "introduction":{
      "title":"Introduction blabla",
      "content":[
         "My name's Test'",
         "I love you!"
      ]
   },

....

}

I read your forum and especially this topic:

‌JSON Data and Word Template Output - Free Support Forum - aspose.com

However, no I didn’t found any help for access to the array by foreach.

<<foreach [in introduction.content]>><<[introduction.content_Text]>><</foreach>>

<<foreach [t in introduction.content]>><<[t_Text]>><</foreach>>

Both retrieve empty string.

without the suffix, it displays the object name DataRow.

@binhsyncr

Can you please provide more details about the specific issue you are facing with the foreach loop in the reporting engine? Are you using any specific version of Aspose.Words for Java?

I’m using Aspose.Words for .NET.

I just want to display in my word document:
My name’s Test
I love you!

Finally, I found the good syntax

<<foreach [in introduction.content]>><<[content_Text]>><</foreach>>

We mut use only the last level of the property.

1 Like