Is your feature request related to a problem? Please describe.
I need to display a list of people in a document. They have several properties : names, phone, email...
This can be displayed as bullet points or different paragraph for each people.
Describe the solution you'd like
I imagine a syntax in the word file like
People in company $companyName
[for index, item in people]
People number $index
Civility: [if $item(civility) == Mr]Mister[endif][if $item(civility) == Miss]Miss[endif]
Name : $item(firstName) $item(lastName)
Address : $item(adr.street1) $item(adr.street2) $item(adr.zip)$item(adr.city)
[endfor]
with a json file like
"variables": {
"companyName": {"type": "text", "value": "Dev Inc."},
"people": {"type": "array", "value": [
{
"firstName": "Corinne",
"lastName": "Dupont",
"civility": "Miss",
"addr": {
"street1": "5 rue de la paix",
"street2": "",
"zip": "38000",
"city": "Grenoble"
}
},
{
"firstName": "Robert",
"lastName": "Durand",
"civility": "Mr",
"addr": {
"street1": "15 place des fêtes",
"street2": "",
"zip": "38000",
"city": "Grenoble",
},
}
]}
}
And the result would be
People in company Dev Inc.
People number 0
Civility: Miss
Name : Corinne Dupont
Address : 5 rue de la paix, 38000 Grenoble
People number 1
Civility: Mister
Name : Robert Durand
Address : 15 place des fêtes, 38000 Grenoble
Note :
This syntax can work with a simple array or with a dict for the "people" value
Describe alternatives you've considered
No response
Additional context
This syntax is not very easy because the syntax used implies a change in the scanning system of simple vars. But I believe we should not continue to create new prefix like $ or & for each variable type.