# Matter of Sorting element - What is Custom Sort?

I am investigating this Sort node in Animation Nodes. I found it to be confusing especially with Custom sort and Key List. I cannot guess what this is for.

Is there a documentation or can anyone help me to understand this Sort node a little better.

NOTE: Btw, I think the sorting of Text Sequence Script in VSE has issue. I have it happening on my latest live noding video.

Thanks.

• hey, did you read the answer to your question? – Noidea Sep 20 '16 at 13:30
• I just noticed this answer, I will test it with strings. thanks! – Blender Sushi Guy Sep 21 '16 at 18:20

## 1 Answer

Custom Sort: In general, you can sort a list of objects by key. E.g. if you have a list of customers, you can sort them by various keys such as first name, last name, customer number, etc.

Key - a key for a custom sort, which can be written as an expression using the attributes of your list element e. For example, you can enter e.location.x as as a Key to sort the list of objects based on their x location.

Key List - list of sorting keys. If your sorting key is not an attribute of the objects in the list, you can plug the list of key into the Key List Node. For example, look at this answer, where the polygons are sorted according to the distance to some point using Sort List node. Computed distances are used as a Key List.