javascript - node-js: expree-formidable parse value - array overwritten -
i have problem parsing forms in node js , express-formidable. i figured out problem occurs don't know why , how fix correctly. my problem when want add people array , save them in .json file can add first person --> ok if want add second,third,... second person added, existing person in array(and json-file) overwritten second person. if add 1. howard stored in array. if add 2. michael array has 2 entries michael , no howard. the problem is: app.post('/profiles', formidable()); because if delete line , re-write storeprofil function normal formidableparse works , can add people array: storeprofile: function (req) { var form = new formidable.incomingform(); form.keepextensions = true; form.parse(req, (err, fields, files) => { //var err =""; app.fixtures.push(fields); ............. }); i have mvc pattern - can find code below: could please tell me why not work express-formidable? thanks! entr