[SOLVED] sort array in component by editor script

i thought the code:

            Array.Sort(target.a1);
            Array.Sort(target.a2);
            serializedObject.ApplyModifiedProperties();

will do it, but looks like it does not

EditorUtility.SetDirty(target);
Array.Sort(target.a1);
Array.Sort(target.a2);
serializedObject.ApplyModifiedProperties();