how do i insert an array into db

i have a json array
[
{
column1: text,
column2: text,
column3: text
}
{
...
}
...
]
[
{
column1: text,
column2: text,
column3: text
}
{
...
}
...
]
How do i insert this into db. I've tried mapping the array but i cant await inside map
2 Replies
Kuba
Kuba3mo ago
Use Promise.all within a transaction
Sunbect
SunbectOP3mo ago
Got it, thank you!
Want results from more Discord servers?
Add your server