Recently I got a question in a previous post about the sort expression in Power Automate:
I am attempting to use this expression in a compose box to sort by a numeric ascending value, but it is sorting that value as if it were a word and not a number. How would I amend this expression to sort the array by a number value that is apparently stored as a text string?
Let’s have a look at the issue. If we have an array of objects as the below one in a compose action to be simple, with a integer value as String (number property):
[
{
"firstName": "Sylvester",
"lastName": "Mavros",
"country": "Sudan",
"number": "1"
},
{
"firstName": "Reed",
"lastName": "Dunne",
"country": "Cape Verde",
"number": "10"
},
{
"firstName": "Gabriel",
"lastName": "Balenzuela",
"country": "Hong Kong",
"number": "4"
},
{
"firstName": "Kory",
"lastName": "Melot",
"country": "Azerbaijan",
"number": "30"
},
{
"firstName":...
Source link
More About This Author

-
SharePoint and Office 365 Consultant/Developer always trying to get the best from Microsoft stack (Microsoft 365/Azure/Power Platform and related stuff).
Living in Ireland since 2018, I had previously worked in Brazil as a consultant/developer for Office 365, SharePoint and related technologies for almost 10 years.
Array
Modern Workplace16 September 2023Call authenticated external APIs using JavaScript from Power Pages
Modern Workplace9 September 2023Using SharePoint list formatting and Power Automate to create linked items (via LookUp field) in a related list
Modern Workplace1 September 2023Using the HTTP with Azure AD connector in Power Automate to create Planner Plans and add them as Teams tabs
Modern Workplace26 August 2023Create an Issue Tracker App using Power Apps Copilot (Preview)