I have an array which is stored in a local storage.
How do I make it multi dimensional e.g this allows me to store only one set of values
//STEP 1 - create a JSON Object
var Basket = { ProductID: product, Quantity: quantity , Price: price , Total: total}
and how do i loop through the values and get the results, I am not sure how to get this done in javascripts but I have a vague idea
e.g.
//STEP 2 - create an array
var BasketContents = new BasketContents[]
//STEP 3 - create array of objects
BasketContents[i].push ... values here// how I (1) check if empty (2) or else insert/increment values into here dynamically
//step 4 - reiterate through my array
var results = "";
for (i=0;i =< BasketContents.length ; i++)
{
results = BasketContents[i].Basket //display contents here
}