You need not loop. Following would suffice
$x->{user}->{favorites} = {item => $x->{user}->{favorites}};where $x is your original structure
In reply to Re^3: XML::Simple, XMLOut() question
by samarzone
in thread XML::Simple, XMLOut() question
by duesouth
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |