JSFiddle - React, Tailwind, and code Playground
CSS
body {
white-space: pre;
}
JavaScript
var data = {"edson":"Edson","ana":"Ana","caina":"Caina","sarah":"Sarah"};
/* The magic stuff is here */
data.responseData.sort(function (a, b) {
a = a.performanceField.performanceName,
b = b.performanceField.performanceName;
return a.localeCompare(b);
});
/* this is just for displaying, might not work in older browsers */
document.body.innerHTML = "";
var t = document.createTextNode(JSON.stringify(data.responseData, null, 4));
document.body.appendChild(t);