function changeData (obj) { let {A, B, C} = obj return {[A]: [B, C]} } console.log(changeData({A:"NAME",B:"123",C:"456"}))