The problem with async?

var cache = {
 order: null
cache.order = order; // order here.status = "in progress"
// I need to assign to cache.order the full order object but it manages to set the status is set to open
// how to wait until it will assign and then change the values?
order.invitedPerformers = order.invitedPerformersCache;
order.performer = null;
order.status = "open";
July 8th 19 at 16:33
1 answer
July 8th 19 at 16:35
To completely clone the object will not work. All variables will store references to object. You can use cycle to clone the object.

Find more questions by tags Express.jsAsynchronous programmingJavaScriptNode.js