create a json object out of multiple objects
- I need to query multiple records from Airtalbe (different tables) and construct a json object which suites a Contentful content type.
Therefore I request the values and use a JSON create module to transform the values from Airtable to a JSON object.
from Airtable I receive 3 values from different requests (searches)
primary text
table (escaped json string)
ingredients
Now, with the json create module I want to create a json object including those 3 attribues.
{
"primary_text" : "ptext value",
"table" : {
"headers" : ["a","b","c"],
"rows" : [ ......]
},
"ingredients" : "salt, ..."
}
When creating the JSON create structure, I can not find a suiting data type for the table field which is a json object.
Here is an example json create input with the resulting output
This creates the following output:
When I pass this result on to contentful - create entry it is rejected with the error the value type is supposed to be “object”.
Any ideas how I can create a json object and use it as input for a contentful create entry module?