Here is the payload and need to insert payload.b data individually
payload = {
a:test1,
b: [1,2,3,4]
}
expecting out in table db
test1 1
test1 2
test1 3
test1 4
i tried using unset query shown below
query = INSERT INTO "store" ("userId", "eventTypeId") SELECT ${payload.userId} AS "userId", unnest(${payload.eventTypeIds}) AS "eventTypeId"
New contributor
Akhilesh Sooji is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.