const arr = ['xm', 'xh', 'xh']
const res = arr.map((item, index) => {
return item + index
})
console.log(res) // ['xm0', 'xh1', 'xh2']
const arr1 = [{ lab: 'xm', val: '01' },{ lab: 'xh', val: '02' }]
const res1 = arr1.map(item => ({
label: item.lab,
value: item.val
}))
console.log(res1) // [{ label: 'xm', value: '01' },{ label: 'xh', value: '02' }]