Hello I am new to the community and this is my first question.
/// I have an array of objects. Will be a few hundred at some point.
var locations = [{
"name": "Costco",
"city": "San Francisco",
"state": "CA",
"zip": "75201",
}, {
"name": "Safeway",
"city": "Appleton",
"state": "WI",
"zip": "90210",
}, {
"name": "Foodmart",
"city": "Orlando",
"state": "FL",
"zip": "90210",
}, {
"name": "Trader Joes",
"city": "Concord",
"state": "CA",
"zip": "90210",
}];
/// I need to count each "state:" and hold the value as a variable like below.
var CA
/// Value would be 2
var FL
/// Value would be 1
var WI
/// Value would be 1
/// forgive me, I am a bit rusty with array's
states={'CA':2,'FL':1,etc}