I need to update this array so the result is as below without causing mutation to it.
From this:
var cart = [ { customerId: "1", items: