Array of Objects Drizzle
Hey there, can anyone help me with an issue on Drizzle Studio? On my schema, I have a question table with a answers field that I defined like this:
answers: json('answers').array()
But when I run drizzle studio and I try to add an object inside of an array it gives me an error saying malformed array literal, does anyone know what is the correct syntax to add it manually there on the drizzle studio?
And also to add it through the code using insert ?
4 Replies
try this:
even like this I get the same error, how do you declare this field on your schema to be able to pass input like this on drizzle studio ?
try to do it programatically insted of with the studio
I am using JSON and it works fine
turns out it was an issue on Drizzle Studio and it is now fixed