Hello,
I am trying to create a JSON from a MySQL select call to use in an API call to HubSpot to update contacts in a batch.
I can´t figure out to create the required JSON for this.
At first I tried to use the Text Aggregator which would work fine, but I don´t know how to define that the last collection should not have a comma at the end.
If someone can give me a hint, the issue would be solved.
I tried the JSON aggregator but the format never ends up like it is needed.
So here is what I need:
{
"inputs": [
{
"id": "1",
"properties": {
"company": "Biglytics",
"email": "bcooper@biglytics.net",
"firstname": "Bryan",
"lastname": "Cooper",
"phone": "(877) 929-0687",
"website": "biglytics.net"
},
{
"id": "2",
"properties": {
"company": "Biglytics",
"email": "bcooper@biglytics.net",
"firstname": "Bryan",
"lastname": "Cooper",
"phone": "(877) 929-0687",
"website": "biglytics.net"
},
}
]
}
With the JSON aggregator I only managed to get the following formats
[
{
"inputs":[
"1"
],
"properties":{
"company": "Biglytics",
"email": "bcooper@biglytics.net"
}
},
{
"inputs":[
"2"
],
"properties":{
"company": "Biglytics",
"email": "bcooper@biglytics.net"
}
}
]
[
{
"inputs":[
{
"id":"20095051",
"properties":{
"company": "Biglytics",
"email": "bcooper@biglytics.net"
}
}
]
},
{
"inputs":[
{
"id":"7833352",
"properties":{
"company": "Biglytics",
"email": "bcooper@biglytics.net"
}
}
]
}
]
I could get rid of the brackets like described here, but the general structure doesn´t match.
Thank you so much for you help,
Ingo