compare by string the array of values and sort