Skip to main content
Known Participant
March 16, 2022
Answered

Using document generation API, do I have to flatten nested lists?

  • March 16, 2022
  • 1 reply
  • 1027 views

Trying to access variables 2-3 levels deep,  to be able to access variables that deep, do I need to flatten first?  Thanks in advance.

This topic has been closed for replies.
Correct answer Raymond Camden

You shouldn't need to. Given JSON like so:

 

{
"person": {
"name":{
"first":"Ray"
}
}
}

(Pardon the lack of indentation.) I could then use {{ person.name.first }} in my document.

1 reply

Raymond Camden
Community Manager
Raymond CamdenCommunity ManagerCorrect answer
Community Manager
March 18, 2022

You shouldn't need to. Given JSON like so:

 

{
"person": {
"name":{
"first":"Ray"
}
}
}

(Pardon the lack of indentation.) I could then use {{ person.name.first }} in my document.

Participant
May 2, 2023

@Raymond Camden 
The MS Word Add-in for Adobe Document Generation has a feature to generate tags from JSON for drag-and-drop - does this only work for top-level variables? 

Raymond Camden
Community Manager
Community Manager
May 3, 2023

It works just fine with values under the root. I literally used the JSON above and it worked just fine: