I have a list of structs as follows
row = [
{
"name":<name1>,
"age" :<age1>,
"job" :<job1>
},
{
"name":<name1>,
"age" :<age1>,
"job" :<job1>
},
{
"name":<name1>,
"age" :<age1>,
"job" :<job1>
},
etc...
]
I want to insert this into an SQL table. So far I was running a loop through the array and inserting each row one by one. But is there any other way by which I can insert all the rows with just one query? I know bulk insert, but my understanding is that, for bulk insert, I will have to import data from an external file. I don't want to do that. How do I use the data from this array and perform bulk insert?