I have an array say
var a = ['N','Normal','S','Severe','C','Confidential']
I need the output format like below,
[{code:'N',description:'Normal'},
{code:'S',description:'Severe'},
{code:'C',description:'Confidential'}
]
Is there any way to achieve this?