I have an array of dictionaries. And I need to sort this array in an ascending order.
someArray = someArray.sorted { lValue, rValue in lValue.categoryName < rValue.categoryName }
So one of the dictionaries is categoryName. Now, I have a case where the category name of an array element is something specific, say 'price,' then that element must be listed at the end as an exception to the rule above. Is that possible? Thanks.
I've used a custom sorting method with enum in reference to a topic at stack overflow.. (the one written by Martin R...)