sorry for noobie question. Can you explain please, what is the difference between:
1. var a = []; a[\'b\'] = 1; 2. var a = {}; a[\'b\'] = 1; >
1. var a = []; a[\'b\'] = 1; 2. var a = {}; a[\'b\'] = 1;
I would use an array of objects:
collection = [ { "key":"first key", "value":"first value" }, { "key":"second key", "value":"second value" } ];
etc