Mysql Nodejs对具有动态属性的行的多个sql更新?
如果动态接收到如下对象:Mysql Nodejs对具有动态属性的行的多个sql更新?,mysql,sql,node.js,api,Mysql,Sql,Node.js,Api,如果动态接收到如下对象: user_employers = [ { id:'1', username: 'b.burke', user_type: 'employer', name: 'betty burke', company_profile: 'http://acme.example.com/about_us/' }, { id:'2', username: 'b.burke', user_type: 'job_seeker', name: 'joh
user_employers = [
{
id:'1',
username: 'b.burke',
user_type: 'employer',
name: 'betty burke',
company_profile: 'http://acme.example.com/about_us/'
},
{
id:'2',
username: 'b.burke',
user_type: 'job_seeker',
name: 'john smith',
email: 'j.smith@example.com',
resume: true,
resume_date_time: '2109-01-01',
salary_expectation: 100000
},
// and so on, with dynamic properties
]
如何使用诸如user_employers object中的动态属性对用户的一行进行多次更新?如果每个对象不包含相同的密钥集,则需要遍历数组并对每个对象执行更新。