Promise
.resolve({ data: [1, 2, 3] })
.then(data => {
return data
})
.then(dataAgain => {
return dataAgain
}).then(dataAgainAgain => {
return Promise
.resolve(dataAgainAgain)
.then(dataAgainAgainAgain => {
dataAgainAgainAgain.data.push(4)
return dataAgainAgainAgain
})
}).then(dataAgainAgainAgainWith4 => {
console.log(dataAgainAgainAgainWith4) // [1,2,3,4]
})