"buttons": [
{
"payload": "3",
"title": "Check my money transfer status"
},
{
"payload": "1",
"title": "Need help with money transfer"
},
{
"payload": "2",
"title": "Have a question on Western Union locations"
},
{
"payload": "4",
"title": "General questions"
}
]
I am getting the above response but the orders are different. I need to sort the order based on payload ascending order
I want the Final Output to look like this below:
"buttons": [
{
"payload": "1",
"title": "1. Need help with money transfer"
},
{
"payload": "2",
"title": "2. Have a question on Western Union locations"
},
{
"payload": "3",
"title": "3. Check my money transfer status"
},
{
"payload": "4",
"title": "4. General questions"
}
]
question from:
https://stackoverflow.com/questions/65952627/json-response-data-ascending-values-in-swift 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…