I wanted to generate dictionary like below
a = {'A' => [1,2,3], 'B' => [12,13], 'C' => [32,432]}
var h = {}
gen_h(['A', 1])
gen_h(['A', 2])
gen_h(['B', 13])
gen_h(['C', 32])
gen_h(['C', 432])
should give h value as –
h = {'A' => [1,2], 'B' => [13], 'C' => [32,432]}
This is just normal JavaScript, nothing to do with jQuery.
Then you can do: