I have an array of objects called canvasObjects.

Each object has an attribute called z.

I want to sort this array based on objects z. How do I do this using the sort() method?

Edit
Report