This will work :
var json = { 'items': [{ 'id': 72, 'quantity': 1, 'format': '90ml' }, { 'id': 72, 'quantity': 4, 'format': '70ml'}] }
alert(json.items[1].id);
This will NOT work :
var json = $.cookie('json_string');
alert(json.items[1].id);
the json_string in the cookie is EXACTLY the same as in example #1. After fooling around, I realized I need to do this to make it work:
eval("var json = " + $.cookie("json_cart"));
Is this the correct way to do it? It seems like a hack, im facing some challenges when trying to make this javascript / c# json communication, i tought it would be very easy. Anyway. At least I got it running now.