JSFiddle - React, Tailwind, and code Playground

JavaScript

var arr = [
    {"ref": "object1", "score": "1"},
    {"ref": "object2", "score": "2"}
]

arr.map(function(object) {
    alert(object.ref)
})