I am trying to fill a pdf form using the pdf.co fill a pdf form module.
I would like to pass an array to the ‘fields’ field but am receiving the following error “Array of objects expected in parameter ‘fields’.”
See the screenshots below.
These are the parameters the module allows.
Welcome to the Make community!
Your structure appears to be correct.
However!
That is just a JSON string representation of an array, but it is not a variable of type array.
You need to convert the JSON string into an array using the Parse JSON module.
Here is an example of how to map it:
You might need to “wrap” your array with a variable:
{
"array": INSERT_ARRAY_JSON
}
If you do not want to mess with JSON strings, you can use an Array Aggregator module instead.
3 Likes
That worked, thank you! I had tried that module previously but omitted wrapping the array with
{
"array":
}
Thanks again.
1 Like
No problem, glad I could help! Have a nice day.
2 Likes