I've an object as
const posts = {
"BAhvZrRwcfu":{
"text":"Totally need to try this.",
"user": "heavymetaladam",
vote: 2
},
"BAcyDyQwcXX":{
"text":"Wes. WE should have lunch.",
"user": "jdaveknox",
vote : 3
}
};
is there a way I can sort based on the vote.It seems easier if i make it an array of object