I'm trying to replace links from a dynamic feed after the results are displayed on the page using JQuery.
Basically, the idea is to look for the values of ARRAY1 and replace them with the same index value of ARRAY2. For example:
ARRAY1 = ['hello','how','are','you'];
ARRAY2 = ['hi' , 'I' ,'am' ,'ok'];
So, if the loop finds the VALUE 'hello', then replace it for 'hi', if it finds 'how' then replace it with 'I'... and so on.
indexOf()will help you to solve this problem