81
rated 0 times
[
84]
[
3]
/ answers: 1 / hits: 14266
/ 11 Years ago, thu, january 2, 2014, 12:00:00
I'm trying to create a Dictionary with a key and a value list pair. I'm able to create a dictionary for a key value pair but I need to insert a list of Items as value for a key value.
Here is my approach:
keys = ['A', 'B', 'C'];
Elements Corresponding to 'A' : 'apple'
Elements Corresponding to 'B' : 'ball', 'balloon','bear'
Elements Corresponding to 'C' : 'cat','cow'
and my result should be like:
{ key:'A' value:['apple'], key:'B' value:['ball',balloon','bear'], Key:C' value:['cat','cow']}
Here is just a sample data, I will get data dynamically from a table.Please help me out.Thanks In advance.
More From » jquery