Moving Objects based upon branch

I’m having a data structure block.

I have a series of curves that I test and sort based on a “Point in Brep” command. In this example, I’m testing 7 interior curves against 3 container curves. Once I have that list, I want to move each set of curves based on the curve it was inside. So in this example, the first 5 curves move 0, no curves move 1, and 2 curves move 2

I’ve tested every combination of grafting and flattening, but I’m still not getting the results I expected. Any help would be greatly appreciated.

i tested for branches with 0 length and inserted NULL here to match the move values - hope this helps

moving by branch.gh (9.8 KB)

as far as it look s to me - you need none of them.

I love simple Text- Concatenation to play around and learn how grasshopper combines two datasets.