Einzi
Einzi
DTDrizzle Team
Created by Einzi on 6/15/2024 in #help
Array of Objects
OK thanks
6 replies
DTDrizzle Team
Created by Einzi on 6/15/2024 in #help
Array of Objects
Will something like this work
//in the table
jsonb2: jsonb('jsonb2').default([{ foo: "bar" }, { bar: "foo" }])

// to insert
db.insert(table).values([{ jsonb2: [{ first: "first" }, { second: "second" }] }])
//in the table
jsonb2: jsonb('jsonb2').default([{ foo: "bar" }, { bar: "foo" }])

// to insert
db.insert(table).values([{ jsonb2: [{ first: "first" }, { second: "second" }] }])
6 replies