當我用 2 個對象來滿足我的要求時。當我更改其中一個時,另一個會自動更改。我如何像舊請求一樣存儲第二個請求。你可以在下面找到我的意思。我如何存儲第二個?app.post('/example', (request, response) => { const data = request.body; const copy = request.body; //This is a basic example of my problem in node.js //Example request.body[0].execution = 10 data[0].execution = 5; console.log(data[0].execution); // it shows 5 console.log(copy[0].execution); // it shows 5, I dont know why ? I need 10 like request});
當我更改一個請求時,如何存儲其他請求?
森林海
2023-09-28 10:18:37