# Sorting OwnedArray for presets alphabetically

**URL:** <https://forum.juce.com/t/sorting-ownedarray-for-presets-alphabetically/13593>\
**Category:** General JUCE discussion\
**Created:** [September 20, 2014, 5:47pm UTC](https://forum.juce.com/t/sorting-ownedarray-for-presets-alphabetically/13593 "2014-09-20T17:47:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lapsang](https://avatars.discourse-cdn.com/v4/letter/l/3be4f8/32.png) [@lapsang](https://forum.juce.com/u/lapsang)\
**Post date:** [September 20, 2014, 5:47pm UTC](https://forum.juce.com/t/sorting-ownedarray-for-presets-alphabetically/13593/1 "2014-09-20T17:47:52Z")

</div>

I'm trying to build a preset system with a OwnedArray, everything seems to work fine but I don't know how can I sort the presets alphabetically.

I don't understand how to use the sort method with element comparator, can someone explain it to me?

Thanks in advance.
