当我用 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
});
噜噜哒
相关分类