Hi there,
I have the following hash data structure. I have two issues:
1) how do I add to it?
2) how do I reference the lowest level array values from it?
For example, if I want to add another "test" value in the "heading" key of the "datestamp1" key of the "demo1" key, how do I do it?
Similarily, if I later want to print that value, how do I reference it?
I can't seem to figure it out.
Thanks!
%cals => {
"demo1" => {
"datestamp1" => {
"heading" => ["test1","test2", ... "testx"]
"event_num" => ["1","2",..."x"]
}
"datestampx" => {
"heading" => ["test1","test2", ... "testx"]
"event_num" => ["1","2",..."x"]
}
}
"demox" => {
"datestamp1" => {
"heading" => ["test1","test2", ... "testx"]
"event_num" => ["1","2",..."x"]
}
"datestampx" => {
"heading" => ["test1","test2", ... "testx"]
"event_num" => ["1","2",..."x"]
}
}
}
I have the following hash data structure. I have two issues:
1) how do I add to it?
2) how do I reference the lowest level array values from it?
For example, if I want to add another "test" value in the "heading" key of the "datestamp1" key of the "demo1" key, how do I do it?
Similarily, if I later want to print that value, how do I reference it?
I can't seem to figure it out.
Thanks!
%cals => {
"demo1" => {
"datestamp1" => {
"heading" => ["test1","test2", ... "testx"]
"event_num" => ["1","2",..."x"]
}
"datestampx" => {
"heading" => ["test1","test2", ... "testx"]
"event_num" => ["1","2",..."x"]
}
}
"demox" => {
"datestamp1" => {
"heading" => ["test1","test2", ... "testx"]
"event_num" => ["1","2",..."x"]
}
"datestampx" => {
"heading" => ["test1","test2", ... "testx"]
"event_num" => ["1","2",..."x"]
}
}
}