fetch("/user/").then(r=>r.json()).then(j=>j.map(u=>"INSERT INTO USER ("+Object.keys(u).join()+") VALUES ("+Object.keys(u).map(c=>"'"+(u[c].constructor==Array?u[c].join('\n'):u[c]).replace(/'/g,"''")+"'").join()+");").join('\n')).then(j=>console.log(j))fetch("/activity/").then(r=>r.json()).then(j=>j.map(u=>"INSERT INTO ACTIVITY ("+Object.keys(u).map(c=>`'${c}'`).join()+") VALUES ("+Object.keys(u).map(c=>"'"+(u[c].constructor==Array?u[c].join('\n'):u[c]).replace(/'/g,"''")+"'").join()+");").join('\n')).then(j=>console.log(j))