xxxxxxxxxx
//https://code.jquery.com/jquery-3.5.0.js
var scores = '{ "first": { "score": 660 }, "second": { "score": 330 } }';
var objkeys = $.parseJSON(scores);
$.each(objkeys, function(key, value) {
$.each(value, function(key, value){
console.log(value);
});
});
xxxxxxxxxx
var someObj = { foo: "bar"};
$.each(someObj, function(propName, propVal) {
console.log(propName, propVal);
});
xxxxxxxxxx
$.map(mapArray, function(val, key) {
alert("Value is :" + val);
alert("key is :" + key);
});