Skip to main content

I have a list and with ListSearcher i found that element with id {_list_index} needs to be removed completely from the list. How can i achieve this.

Hi @bradr, the ListElementFilter from the FME Hub might help you to keep or remove elements that match a specific condition.


This is why lists should be JSON structures... :-)


This calls for a ListElementRemover.

Post the idea, I would suggest.


This calls for a ListElementRemover.

Post the idea, I would suggest.

I have exactly that custom transformer. Unfortunately I'm not allowed to post CT developed on company time, but it's a fairly straight forward PythonCaller. Get the list name, get the index, loop though the list (starting at i) replacing the attribute of list{i} with list{i+1}, remove list{-1}. The only "gotcha" is the behaviour of complex lists. Do you remove only the subcomponent, without reindexing, or do you remove all the related lists for that index, and reindex all of them.

Hi @bradr, the ListElementFilter from the FME Hub might help you to keep or remove elements that match a specific condition.

 

Tanks @takashi, the ListElementFilter does the job!

This calls for a ListElementRemover.

Post the idea, I would suggest.

done, https://knowledge.safe.com/idea/38197/listelementremover.html

 

 


Reply