I can loop through each roomtype but if a roomtype has more that one mealtype I get this error:
The ForceArray option is enabled. Please Help!
gives me this error message / faulty output:
Not a HASH reference
This is the dump from the XML that is begin returned to me:
$VAR1 = {
'success' => 'true',
'data' => {
'bb' => {
'roomtypes' => {
'roomtype' => [
{
'rtimage' =
+> '10002-2.jpg',
'ratescheme
+' => '1',
'rtid' => '
+2',
'roomsfree'
+ => '2',
'childpolic
+y' => {
+ 'general' => '2 - 12 years stay',
+ 'allowchild2' => 'Y',
+ 'allowchild1' => 'Y'
+ },
'mealtypes'
+ => {
+ 'mealtype' => [
+ {
+ 'defaultmealtype' => 'true',
+ 'rates' => {
+ 'pax3' => '1180.00',
+ 'pax2' => '930.00',
+ 'pax4' => '1405.00',
+ 'pax1' => '550.00'
+ },
+ 'mealtypedesc' => 'Bed & Breakfast',
+ 'rateid' => '6'
+ },
+ {
+ 'rates' => {
+ 'pax3' => '850.00',
+ 'pax2' => '700.00',
+ 'pax4' => '975.00',
+ 'pax1' => '450.00'
+ },
+ 'mealtypedesc' => 'Self-catering',
+ 'rateid' => '7'
+ }
+ ]
+ },
'maxoccupan
+cy' => '6',
'minlos' =>
+ '0',
},
{
'ratescheme
+' => '1',
'rtid' => '
+1',
'roomsfree'
+ => '5',
'descriptio
+n' => 'Double bed',
'childpolic
+y' => {
+ 'general' => '2 - 12 years stay',
+ 'allowchild2' => 'Y',
+ 'allowchild1' => 'Y'
+ },
'mealtypes'
+ => {
+ 'mealtype' => {
+ 'defaultmealtype' => 'true',
+ 'rates' => {
+ 'pax2' => '800.00',
+ 'pax1' => '500.00'
+ },
+ 'mealtypedesc' => 'B&B',
+ 'rateid' => '5'
+ }
+ },
'maxoccupan
+cy' => '2',
'minlos' =>
+ '0',
}
]
},
},
'nights' => '1',
'enddate' => '2011-01-24',
'startdate' => '2011-01-23'
}
};