# Sorting sublists by a parameter

**URL:** <https://forum.dynamobim.com/t/sorting-sublists-by-a-parameter/97813>\
**Category:** Revit\
**Created:** [February 5, 2024, 6:24pm UTC](https://forum.dynamobim.com/t/sorting-sublists-by-a-parameter/97813 "2024-02-05T18:24:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benjamin123123](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@Benjamin123123](https://forum.dynamobim.com/u/Benjamin123123)\
**Post date:** [February 5, 2024, 6:24pm UTC](https://forum.dynamobim.com/t/sorting-sublists-by-a-parameter/97813/1 "2024-02-05T18:24:16Z")

</div>

Hello,

I am looking for a way to sort sublists by a parameter value.  
As seen in the picture below, in sublist 0, the following values belong the the corresponing families:

0 - 5000  
1 - 5000  
2 - 8000  
3 - 10000  
4 - 10000  
5 - 8000

What i want is:  
0 - 5000  
1 - 5000  
2 - 8000  
3 - 8000  
4 - 10000  
5 - 10000

And so on for the sublists to follow. Could someone help me?

Thanks!

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

---

<div class="post-metadata">

**Author:** ![bvs1982](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bvs1982](https://forum.dynamobim.com/u/bvs1982)\
**Post date:** [February 5, 2024, 6:43pm UTC](https://forum.dynamobim.com/t/sorting-sublists-by-a-parameter/97813/2 "2024-02-05T18:43:37Z")

</div>

List.SortByAnother.

List.GroupByKey

Both can work.
