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
Kuba5mo ago
Use Promise.all within a transaction
Sunbect
SunbectOP5mo ago
Got it, thank you!

Did you find this page helpful?