Mình có một mảng thế này:
var data = [{
name: 'Margret Swanson',
id: 'ms',
color: 'red',
label_color: 'white',
pos: 'President',
phone: '630-555-1111'
},
{
name: 'Mark Hudson',
id: 'mh',
parent: 'ms',
pos: 'Vice President Marketing',
phone: '630-555-1111'
}]
Giờ mình muốn trộn thuộc tính pos và phone thành attributes:
[
{
name: 'Margret Swanson',
id: 'ms',
color: 'red',
label_color: 'white',
attributes: {pos: 'President',phone: '630-555-1111' }
},
{
name: 'Mark Hudson',
id: 'mh',
parent: 'ms',
attributes: {
pos: 'Vice President Marketing',
phone: '630-555-1111'
}
]
Các bạn giúp mình với ạ 
83% thành viên diễn đàn không hỏi bài tập, còn bạn thì sao?