I did a quick search and couldn't find a solution. I solved it in a pretty complex way some time ago, but was wondering if there is an easier way.
Problem: I have an associative array of a form:
assarr = ["AA" => "AAA", "BB" => "BBB", => "CCC" ];
I have a column "A" that has either "AA", "BB", or something else.
I need to fill column "B" with values based on the associative array and column "A". i.e. for a row with "A" having "AA", "B" should be "AAA" and so on. If "A" has values not in the array, "B" should get the default "CCC".
Based on the fact how easy it is to create an associative array from two columns, there should be equally easy way to fill column based on associative array and another column with keys.
Thanks,
M.