I need to output a list of paired values as a JSON File.
I have a list called JSONList with two attributes JSONname and JSONvalue.
I am using the JSONTemplater to organise the data.
I have the root template set as
{
"publishedParameters": [
fme:process-features("SUB")
]
}
and the SUB Template as
{
"name": fme:get-list-attribute("JSONList{}.JSONname"),
"value": fme:get-list-attribute("JSONList{}.JSONvalue")
}
but I am just getting the name and value as a single line each.

How do I change the structure so each name and value pair are separated, similar to the below?
{
"publishedParameters": [
{
"name": "_portalLayer",
"value": "parks"
},
{
"name": "_portalOrganisation",
"value": "SWR"
}
]
}