I was wondering if anyone could help me with a simple solution to convert each integer in a javascript string to its corresponding key in a key:value pair array. For example if I have:
var arr = {'3':'value_three', '6':'value_six', '234':'other_value'};
var str = 'I want value 3 here and value 234 here';
I would expext the output to be:
new_str = 'I want value_three here and value other_value here'
Sorry this is my first post so I hope that makes sense, I'm using javascript and jquery (latest version). Any help would be grealy appreciated.