Get a Item from Sublist if it Contains matching Item from another list

I am trying to get the Tag of a Link Element after I have sorted my Linked elements. I have a list of Tags with the element ID they are associated with, and have a list of element ID’s. What I would like to do is grab the Tag from top list that matches the Element ID from the bottom list.

Thanks in advance

You’re probably better off sorting your whole list instead of just the linked elements. That way everything stays together and you can just get the info in the correct order.

Just use the linked element (or whatever criteria you’re using to sort by) as the key with SortByKey.

If the list are allways the same length and have the same order wouldn’t the node List.GetItemAtIndex also work?

Or remove the Indicies you don’t need?