JSFiddle - React, Tailwind, and code Playground

JavaScript

var x= {'one':{'copy':'b'},'two':{'copy':'v'},'three':{'copy':'a'}}

var getsort= []

for(i in x){
 var a= new Object();
    a[i]=x[i]
    
    getsort.push(a)
}




getsort.sort(function(a,b){
    //console.log(b)
    //console.log(a.copy)
    var textA = a.copy.toUpperCase();
    var textB = b.copy.toUpperCase();
    return (textA < textB) ? -1 : (textA > textB) ? 1 : 0;
})
console.log(getsort)