# Comparing two lists and getting the index of the "matching pairs"

**URL:** <https://forum.dynamobim.com/t/comparing-two-lists-and-getting-the-index-of-the-matching-pairs/60401>\
**Category:** Civil 3D\
**Tags:** dynamo\
**Created:** [February 12, 2021, 4:37pm UTC](https://forum.dynamobim.com/t/comparing-two-lists-and-getting-the-index-of-the-matching-pairs/60401 "2021-02-12T16:37:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tilman](https://avatars.discourse-cdn.com/v4/letter/t/90db22/32.png) [@tilman](https://forum.dynamobim.com/u/tilman)\
**Post date:** [February 12, 2021, 4:37pm UTC](https://forum.dynamobim.com/t/comparing-two-lists-and-getting-the-index-of-the-matching-pairs/60401/1 "2021-02-12T16:37:27Z")

</div>

Hey everyone,

I want to compare two lists and get the Index of the entries in the larger list that match with the entries of the smaller list.

 ![Screenshot (5)](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/7/678aa29d0887e15defd10671dbd8112207b74f14.png)

I would like it to look like:

0: false  
1: false  
.  
.  
.  
13: true  
14: true  
15: false  
.  
.  
.  
2857:false/true

I hope you get the idea. So I tried two ways which not giving me the wanted result. Maybe someone has an idea how it could work out 🙂

Best regards Tilman

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [February 12, 2021, 5:12pm UTC](https://forum.dynamobim.com/t/comparing-two-lists-and-getting-the-index-of-the-matching-pairs/60401/2 "2021-02-12T17:12:51Z")

</div>

@tilman something like this? Swap the ‘list’ input to get the indices you want.

![List](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/7/87a3a5cb4fd31396f31daedeedaed71a82a17a0e.gif)

---

<div class="post-metadata">

**Author:** ![AmolShah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/amolshah/32/103244_2.png) [@AmolShah](https://forum.dynamobim.com/u/AmolShah)\
**Post date:** [February 12, 2021, 5:24pm UTC](https://forum.dynamobim.com/t/comparing-two-lists-and-getting-the-index-of-the-matching-pairs/60401/3 "2021-02-12T17:24:31Z")

</div>

> [@tilman](#):
>
> I would like it to look like:
> 
> 0: false  
> 1: false  
> .  
> .  
> .  
> 13: true  
> 14: true  
> 15: false  
> .  
> .  
> .  
> 2857:false/true

@tilman

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/e/aed3c75996bfbf98a4325b806ad7dbec58a408ff.png)

---

<div class="post-metadata">

**Author:** ![KirkWM](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kirkwm/32/104406_2.png) [@KirkWM](https://forum.dynamobim.com/u/KirkWM)\
**Post date:** [February 27, 2021, 3:32am UTC](https://forum.dynamobim.com/t/comparing-two-lists-and-getting-the-index-of-the-matching-pairs/60401/4 "2021-02-27T03:32:58Z")

</div>

Wow, cool idea about intersecting lists 💡
