# Lists by it's content

**URL:** <https://forum.dynamobim.com/t/lists-by-its-content/101389>\
**Category:** Lists-Logic\
**Created:** [May 28, 2024, 4:34pm UTC](https://forum.dynamobim.com/t/lists-by-its-content/101389 "2024-05-28T16:34:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnny\_m](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@johnny\_m](https://forum.dynamobim.com/u/johnny_m)\
**Post date:** [May 28, 2024, 4:34pm UTC](https://forum.dynamobim.com/t/lists-by-its-content/101389/1 "2024-05-28T16:34:03Z")

</div>

Problemi:

Of a series of lists (0-1-2-3-4ecc.) eachone contains two informations about Name and Values.  
I must filters those lists that contain a certain name without loosing the value associate to It.

Example

List

> 0 list  
> Sun  
> 30

> 1 list  
> Sun  
> 45

> 2 list  
> Moon  
> 40

> 3 list  
> Star  
> 40

> 4 list  
> Sun  
> 50

From this lists I need to create a one list with only the lists containing the Word Sun an the related value

Anyone can help?

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [May 28, 2024, 4:37pm UTC](https://forum.dynamobim.com/t/lists-by-its-content/101389/2 "2024-05-28T16:37:51Z")

</div>

List.Contains into a List.FilterByBoolMask will work here. Watch your list levels and lacing closely, as the input for the ‘contains’ should be @L2 to ensure you catch everything.
