<div dir="ltr"><div><div class="gmail_signature"><div dir="ltr"><div dir="ltr"><div>I'm working on CSV to MARC fix and companion lookup file. I'm looking for a way to iterate over the lookup file rows with non-unique keys and pop the paired values into an array. Is there a way to work with non-unique keys, short of handling this in an external db?</div><div><br></div><div><b>csv</b></div><div>controfield</div><div>777</div><div>888</div><div>999</div><div><br></div><div><b>fix (something like this only returns the last row)</b></div><div><div>paste('names','controlfield')</div><div>lookup(names,'list_700_names.csv')</div><div>marc_add('700',ind1,' 1',ind2,' ',a,$.names)</div></div><div><br></div><div><b>list.csv</b></div><div><div>777,"Solveig"</div></div><div>888,"Patrick"</div><div>888,"Nicolas"</div><div>888,"Jason"</div><div>999,"Brian"</div><div><br></div><div><b>desired output</b></div><div>=001  777</div><div><div>=700  1\$aSolveig</div></div><div><br></div><div>=001  888<br></div><div><div>=700  1\$aPatrick</div><div>=700  1\$aNicolas</div><div>=700  1\$aJason</div></div><div><br></div><div><div>=001  999</div><div>=700  1\$aBrian</div></div></div></div></div></div>
</div>