Remove duplicate list elements - a question

Started by herb, July 05, 2020, 06:54:28 AM

Previous topic - Next topic

herb

Hello Phil, hello starGeek,

I try to remove all duplicate elements from a listtype tag.
exiftool.exe -listtypetag < ${listtypetag; NoDups}
works properly for all listtype tags not defined inside a structure
It works also properly for listtype tags inside a structure object.

But in case of nested lists - e.g. inside a structure list - I have a question:
I set the list elements to (see the following output with -api struct=2)
XMPEixmListB2             : [{Things2=[{Where2=[a,b,c,a,b,c]}]},{Things2=[{Where2=[a,b,c,a,b,c]}]}]
XMPEixmListB2Things2Where2: [a,b,c,a,b,c,a,b,c,a,b,c]


Is there a possibility to remove the duplicate tags only from each Where2-list whithout writing the whole structure?

The only way I know is to use flattened tagnames. But
-sep # -xmp-eixm:xmpeixmlistb2things2where2<${xmp-eixm:xmpeixmlistb2things2where2;NoDups}
leads to
XMPEixmListB2             : [{Things2=[{Where2=[a,b,c]}]}]
XMPEixmListB2Things2Where2: [a,b,c]

because it works for one list with 12 elements

Thanks for your answers in advance
Best regards
herb