Robin Sheat schreef op ma 09-06-2014 om 14:50 [+1200]:
> $ cat test.fixes
> marc_map('650','subject',join:'###');
> remove_field('record');
Ah, I found that I need to change the syntax a bit:
marc_map('650','subject', -split => 1);
gives me:
{"subject":[["Counting","Pictorial works","Juvenile
literature."],["English language","Alphabet","Pictorial works","Juvenile
literature.","14467"],["Time","Pictorial works","Juvenile
literature.","15531"],["Children's stories, English","Pictorial
works."]],"_id":"5567128"}
which is closer. Is there an easy way to flatten those arrays?
Otherwise I can go with join and the split, but this way seems cleaner.
Actually, I wonder if nested arrays would work even better for my
purposes, I guess I should test it...
--
Robin Sheat
Catalyst IT Ltd.
✆ +64 4 803 2204
GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF
signature.asc
Description: This is a digitally signed message part
