Hi all, I am running into a postgres issue with arrays. I have already looked at this post, tried the suggestion and it did not help: Malformed array literal
In my case I am using a javascript query to call an insert that has to be called a few times. JS is breaking apart the data for the query.
This is the code, stats
is the array
for(var i = 0; i < teamKeys.length; i++) {
insertQuery.trigger({
additionalScope: {
stats: teams[teamKeys[i]].stats,
name: teams[teamKeys[i]].teamName,
teamId: teamKeys[i]
},
onSuccess: function() {
console.log('insert success')
}
})
}
The array seems to be getting stringified or something somewhere as this is what it looks like in the error message:
Is it not possible to use an array in the additionalScope section of a query trigger?