Skip to content

Clarify if sort is stable in documentation #897

Description

@tkw1536

The documentation for the sort array filter says

Sorts the elements of an array by a given attribute of an element in the array.

Is this sorting operation stable, i.e. does it maintain the original order of elements with the same attribute value? Such a guarantee is extremely useful, however it is not mentioned anywhere.

I have done some experimentation, and so far this seems to be the case. Is this an implementation detail or can this be assumed in general? Either way, it should be clarified in the documentation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions