I'm getting "map is undefined", not sure why.
Am I passing a wrong variable, or is myMap wrongly declared?
var myMap = new Object();
$(things).each(function(){
var thing= this.attributes.things.Value;
alert("thing= " + thing);
var totalThings= myMap[thing];
alert("totalThings= " + totalThings);
});
thingfield of an empty object:myMap[thing]myMaplooks OK apart from that you could have shortened the constructor invocation to a{}literalmapin that snippet.