So I have data.js where I stored my JSON... It looks like this:
[
{
name: 'Adam Doe',
city: 'New York',
mark: [8,10,10,10]
},
{
name: 'Catlyn Stronk',
city: 'Las Vegas',
mark: [2,2,2,2,2,3,3,3,4]
},
{
name: 'Anna Doe',
city: 'Michigan',
mark: [10,8,8,4,3,2]
}
]
How can I make an array and put somebody with the highest score on top? So since Adam Doe will have the highest score 9.5 he should be first on the list and so on ... I am working in React.js