How to update a specific value in array by JavaScript

Create a sample array like this:How to update a specific value in array by JavaScript How to update a specific value in array by JavaScriptexpoundsofttechsolution Event Methods in jQuery
var dict = { "a": 1, "b": 2, "c": 3 };
Then you can update it like so:
dict.a = 22;
Or you can update it like so:
dict["a"] = 22;
Now your array is looks like:
var dict = { "a": 22, "b": 2, "c": 3 };