You need to sign in to do that
Don't have an account?
Abilash.S
JSON Serialize and display in descending order.
Hi Everyone,
How to display JSON data by serializing in apex and display in descending order. Please have a look below json data.
let jsonData = [
{‘HouseName’:‘anna’,
‘Kilometers’:75
},
{‘HouseName’:‘nancy’,
‘Kilometers’: 55
},
{‘HouseName’:‘sana’,
‘Kilometers’:95
},
]
By getting this data from FE, parse it in apex, and provide list of housenames based on kilometers in descending order.
O/P-should be- [Sana,Anna,Nancy]
Please help me in Apex code.
How to display JSON data by serializing in apex and display in descending order. Please have a look below json data.
let jsonData = [
{‘HouseName’:‘anna’,
‘Kilometers’:75
},
{‘HouseName’:‘nancy’,
‘Kilometers’: 55
},
{‘HouseName’:‘sana’,
‘Kilometers’:95
},
]
By getting this data from FE, parse it in apex, and provide list of housenames based on kilometers in descending order.
O/P-should be- [Sana,Anna,Nancy]
Please help me in Apex code.