In this post, we will see how to resolve Sort an JSON Object Array based on alphnumeric key attribute in JavaScript
Question:
I want to sort this JSON array based on unitIdBest Answer:
To sort the given array based on the alphanumeric unitId, you can use the sort() method with a custom comparator function. Here’s an example:If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com