code: function insertIntoDB() {
                      lastQry = connection.query('INSERT INTO ?? SET ?', [req.params.table , insertJson] , function (err, rows) {
                          if (err) {
                              console.error(err);
                              res.statusCode = 500;
                              res.send({
                                  result: 'error',
                                  err: err.code
                              });
                          } else {
                              sendSuccessAnswer(req.params.table , res, rows.insertId);
                          }
  
                      });
                  }
docs: start the async "for" loop 
  When the loop is finished write everything in the database