jquery/javascript to loop value and optgroup
data 0: {id: 1, banks: 'b1', code: 'active'} 1: {id: 2, banks: 'b2', code: 'parking'} 2: {id: 3, banks: 'b3', code: 'safe'} 3: {id: 4, banks: 'b4', code: 'active'} 4: {id: 5, banks: 'b5', code: 'safe'} 5: {id: 6, banks:…