I have an associative array with the following structure
[location][product] and then [count] and [date] leaf entries
I am trying to initialize it using the code below
summary = {};
if(location in summary == false && product in summary == false){
summary[location][product] = {};
}
then then iterating over an object of sales and assigning values using
summary[location][product]["count"] = count;
summary[location][product]["date"] = countDate;
but I am getting the error below, what am I missing
Type Error: summary[location] is undefined