From: Expert Alart Date: 2013-07-24T04:40:06+09:00 Subject: how to create structure like bellow Hi... I need a structure like bellow , i know its not correct syntax, but just trying to give an idea so that i can get a correct answer .. row value : a-z15a6=5 b-z15a6=4 a-z15a7=3 b-z15a7=3 ...... ....... a-z16af=3 I need to store Value in this... z15a={[a-z15a6=>5,b-z15a6=>4],[a-z15a7=>3,b-z15a7=>3],....n} z16a={[a-z16af=>3,b-z16af=>4],[a-z16ag=>3,b-z16ag=>3],.......n} possible like this [z15a=>{[a-z15a6=>5,b-z15a6=>4],[a-z15a7=>3,b-z15a7=>3],....n}},z16a=>{[a-z16af=>3,b-z16af=>4],[a-z16ag=>3,b-z16ag=>3],.......n}] then i need to calculate value from this example total of z15a = 5+4+3+3 (top row) Total of z16a = 3+ 4 +3 +3 (bottom row) but dont understand whats the logic will i use ... Can any one please give me some light Thanks -- Posted via http://www.ruby-forum.com/.