I get categories collection from product object. I have to pick category with lowest
level possible. To achieve this I want to sort collection by
level and take first item. Although any method I know doesn't work. I have tried:
Why is it like this and is there any way to achieve it?
Of course I can use
getData() and than work with array but it doesn't seem to be good solution.