I have 2 arrays, array a contains keys and array b contains their values
let a = ['name', 'options', 'address', 'options', 'gender', 'options'];
let b = ['john doe', 'a', 'india', 'b', 'male', 'c'];
I want output like this
 { 
  'name': 'john doe',
  'options': 'a, b, c',
  'address': 'india',
  'gender': 'male'
 }
    
a, b, cmap to options? Seems like you're going to have to do this manuallyaarray contains options trice, so it's still one-to-one mapping.