S
sal.x.lopez
I need to convert the following lists:
house,doors,knobs,style
house,doors,knobs,color
house,windows,length
house,windows,width
into a datastructure like this;
$ds = {
'house' => {
'doors' => {
'knobs' => {
'style' => "",
'color' => '""
}
},
'windows' => {
'length' => "",
'width' => ""
}
}
};
Does this require the use of recursive calls? Thanks in advance.
house,doors,knobs,style
house,doors,knobs,color
house,windows,length
house,windows,width
into a datastructure like this;
$ds = {
'house' => {
'doors' => {
'knobs' => {
'style' => "",
'color' => '""
}
},
'windows' => {
'length' => "",
'width' => ""
}
}
};
Does this require the use of recursive calls? Thanks in advance.