The starting key is "/employee". I'm pretty sure the sequences should be:$rdb = { '/employee' => { 'aa' => { 'data' => { 'lastName' => 'BALL', 'key' => '000126' }, 'parent' => '', 'children' => { '/employee/earningStatement' => { 'ah' => { 'data' => { 'checkType' => 'payCheck' }, 'parent' => 'aa', 'children' => { '/employee/earningStatement/earningBase' => { 'al' => { 'data' => { 'gross' => '790.00', 'net' => '405.92', 'ckDate' => '20000126' }, 'parent' => 'ah' } }, '/employee/earningStatement/earningPay' => { 'aj' => { 'data' => { 'hours_earningPay' => '80.00' }, 'parent' => 'ah' }, 'ak' => { 'data' => { 'hours_earningPay' => '' }, 'parent' => 'ah' } } } }, 'ac' => { 'data' => { 'checkType' => 'payCheck' }, 'parent' => 'aa', 'children' => { '/employee/earningStatement/earningBase' => { 'ag' => { 'data' => { 'gross' => '790.00', 'net' => '405.36', 'ckDate' => '20000105' }, 'parent' => 'ac' } }, '/employee/earningStatement/earningPay' => { 'ae' => { 'data' => { 'hours_earningPay' => '80.00' }, 'parent' => 'ac' }, 'af' => { 'data' => { 'hours_earningPay' => '' }, 'parent' => 'ac' } } } } } } } }, '/employee/earningStatement/earningBase' => { 'al' => {}, 'ag' => {} }, '/employee/earningStatement/earningPay' => { 'aj' => {}, 'ak' => {}, 'ae' => {}, 'af' => {} }, '/employee/earningStatement' => { 'ah' => {}, 'ac' => {} } }; $rdb->{'/employee/earningStatement/earningBase'}{'al'} = $rdb->{'/empl +oyee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ah'}{'childre +n'}{'/employee/earningStatement/earningBase'}{'al'}; $rdb->{'/employee/earningStatement/earningBase'}{'ag'} = $rdb->{'/empl +oyee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ac'}{'childre +n'}{'/employee/earningStatement/earningBase'}{'ag'}; $rdb->{'/employee/earningStatement/earningPay'}{'aj'} = $rdb->{'/emplo +yee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ah'}{'children +'}{'/employee/earningStatement/earningPay'}{'aj'}; $rdb->{'/employee/earningStatement/earningPay'}{'ak'} = $rdb->{'/emplo +yee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ah'}{'children +'}{'/employee/earningStatement/earningPay'}{'ak'}; $rdb->{'/employee/earningStatement/earningPay'}{'ae'} = $rdb->{'/emplo +yee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ac'}{'children +'}{'/employee/earningStatement/earningPay'}{'ae'}; $rdb->{'/employee/earningStatement/earningPay'}{'af'} = $rdb->{'/emplo +yee'}{'aa'}{'children'}{'/employee/earningStatement'}{'ac'}{'children +'}{'/employee/earningStatement/earningPay'}{'af'}; $rdb->{'/employee/earningStatement'}{'ah'} = $rdb->{'/employee'}{'aa'} +{'children'}{'/employee/earningStatement'}{'ah'}; $rdb->{'/employee/earningStatement'}{'ac'} = $rdb->{'/employee'}{'aa'} +{'children'}{'/employee/earningStatement'}{'ac'};
Change $VAR1 to $rdb before pasting back into the problem.aa ah al aj aa ah al ak aa ac ag ae aa ac ag af
In reply to Re: Q: So you think you're good with structures? A: Umm... Yes!
by clintp
in thread So you think you're good with structures?
by clintp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |