I have two arrays of integers a=[1,3,5,7] and b=[2,4,6,8].
Now I need to check if a given var $v is in a and if it is, return the equivalent element from b. Example:
if $v in a (and $x is its position) return $b[$x].
How do I perform this?