I have an Array of objects. each object in the Array has a property called "priorityTag"
I would like to sort the Array ascendingly according the "priorityTag". So, I wrote the below posted code, but it does not work.
please let me know how to sort the Array according to the "priorityTag"
Note: priortyTag is a property in of the object that is contained in the Array. in other words, each element in the Array is an object, and each object has a alot of properties, but one of These properties is "PriorityTag"
I want to sort the Array according to the "priorityTag"
code:
sortFeaturesPerPriority2(arr) {
logger.debug('[sortFeaturesPerPriority2]: arr:', arr);
arr.sort((a, b) => a.priorityTag - b.priorityTag);
}