I'd like to calculate the highest number of "probs" , and get the highest number of "labels" with JavaScript or jQuery.
Down below, for example, "tulips."
I'd appreciate your help.
result_predictions=[
{
"label": "roses",
"prob": 0.0056262025609612465
},
{
"label": "daisy",
"prob": 0.005660845898091793
},
{
"label": "dandelion",
"prob": 0.005297524854540825
},
{
"label": "tulips", // What I want to pick
"prob": 0.9730507731437683 //the highest number
},
{
"label": "sunflowers",
"prob": 0.010364603251218796
}
]