I have an array like this(The actual array is dynamic with 40values): ['t1',1, 't2', 3]
I need to convert the above to a hashmap in scala which looks like this: {'t1' => 1, 't2' => 2}
How can I achieve this. Any help would be much appreciated. Thank you.