My store uses localStorage to store the cart. I've used this line to retrieve the value:

```
var kamat = window.localStorage.getItem("simpleCart_items"); alert(kamat);

```

This will retrieve something like :

```
{"SCI-1":{"quantity":1,"id":"SCI-1","price":20,"name":"Valkoinen hiilikuitu -teippi","size":"Tyhjä"},"SCI-3":{"quantity":1,"id":"SCI-3","price":4,"name":"Car Speaker -hajuste","color":"Sport Fresh"}}

```

And as I've stored it as a variable, I want to use it a bit later.

I want to add this before the final curly bracket (after variable kamat)

```
var toimituskulut = {"Toimitus":{"quantity":1,"id":"Toimituskulut","price":8,"name":"Toimituskulut"}};

```

I've tried this as it needs a colon between the items:

```
var kamatjatoimituskulut = kamat + "," + toimituskulut;

```

But won't work. And if it would, it would insert the contents of toimituskulut after the final curly bracket. So what would I need to do?

**EDIT** 

I'm trying to edit it when a button is clicked:

```
$("#posti").live('click', function() {
        $(".maksu").slideDown(600);
        $("#posti").attr("disabled" , "disabled");
        $("#matkahuolto").removeAttr("disabled");
        $("#posti").addClass( "selectedtoimitus" );
        $("#matkahuolto").removeClass( "selectedtoimitus" );
        $(".simpleCart_shipping").html(kamat);  
        var kamatObj = JSON.parse(localStorage["simpleCart_items"]);
        kamatObj['toimituskulut'] = toimituskulut;
        localStorage["simpleCart_items"] = JSON.stringify(kamatObj);

    });

```

But no, it won't add a thing.

[JSFIDDLE](http://jsfiddle.net/gV88c/)

**So, if the local storage looks like this:**

```
{"SCI-1":{"quantity":1,"id":"SCI-1","price":20,"name":"Valkoinen hiilikuitu -teippi","size":"Tyhjä"},"SCI-3":{"quantity":1,"id":"SCI-3","price":4,"name":"Car Speaker -hajuste","color":"Sport Fresh"}}

```

**I want it to look like this when I click a button**

```
{"SCI-1":{"quantity":1,"id":"SCI-1","price":20,"name":"Valkoinen hiilikuitu -teippi","size":"Tyhjä"},"SCI-3":{"quantity":1,"id":"SCI-3","price":4,"name":"Car Speaker -hajuste","color":"Sport Fresh"},"Toimitus":{"quantity":1,"id":"Toimitus","price":5,"name":"Toimituskulut"}}

```

But doing `var kamatjatoimituskulut = kamat + "," + toimituskulut;`
would only output something similar to this, right?

```
{"SCI-1":{"quantity":1,"id":"SCI-1","price":20,"name":"Valkoinen hiilikuitu -teippi","size":"Tyhjä"},"SCI-3":{"quantity":1,"id":"SCI-3","price":4,"name":"Car Speaker -hajuste","color":"Sport Fresh"}},"Toimitus":{"quantity":1,"id":"Toimitus","price":5,"name":"Toimituskulut"}

```