Rewrite list with selected elements keeping structure

Hi everybody,

First of all, much appreciate for this amazing section, I have learned a ton.

And second, I would like some help with the following problem, it may be a little basic, sorry.
I am trying to compare two lists, one longer and the other shorter, and if two elements match, keep it in the index position of the first list and delete the rest of the elements, I mean, a null value. In this case I would something like this:

[0] Revision 7
[3] Revision 295774
[6] Revision 295777

I get to the point where the two list are compared, but I can´t figure out a way to get to that result. Thanks!

An If node could do what you need:

Hi @Yna_Db,

Thanks a lot for your quick response. I tried to do what you suggested me, no luck. I was running into another problem there, the second list length is not the same than the first one and with the if node I couldn´t get the desired result. Instead, thanks to your suggestion, I found another post with the solution, posted here if someone runs into the same issue (I was going to bang my head onto the keyboard). Good weekend to all!

1 Like