<?php
$array = [
"Apartamento" => [ "Characteristics" => [
"external_area"=>
[
0=> "varanda",
1=> "lavanderia",
2=> "piscina",
3=> "muros",
4=> "area_serviço"
],
"bedroom"=>
[
0=> "piso_frio",
1=> "alvenaria",
2=> "azulejo_teto",
3=> "massa_corrida"
]
]
],
"Casa" => [ "Characteristics" => [
"internal_area"=>
[
0=> "mesa de madeira",
1=> "area"
],
"options"=>
[
0=> "2 andares",
1=> "banheiro externo",
]
]
]];
{
global $Characeristics;
$Characeristics[] = $item;
});
$result = array( "Characeristics" => $Characeristics );
PD9waHAKCiRhcnJheSA9IFsKIkFwYXJ0YW1lbnRvIiA9PiBbICJDaGFyYWN0ZXJpc3RpY3MiID0+IFsKICJleHRlcm5hbF9hcmVhIj0+CiAgICBbCiAgICAgIDA9PiAidmFyYW5kYSIsCiAgICAgIDE9PiAibGF2YW5kZXJpYSIsCiAgICAgIDI9PiAicGlzY2luYSIsCiAgICAgIDM9PiAibXVyb3MiLAogICAgICA0PT4gImFyZWFfc2VydmnDp28iCiAgICBdLAogICAgImJlZHJvb20iPT4KICAgIFsKICAgICAgMD0+ICJwaXNvX2ZyaW8iLAogICAgICAxPT4gImFsdmVuYXJpYSIsCiAgICAgIDI9PiAiYXp1bGVqb190ZXRvIiwKICAgICAgMz0+ICJtYXNzYV9jb3JyaWRhIgogICAgXQogICBdCiAgIF0sCiJDYXNhIiA9PiBbICJDaGFyYWN0ZXJpc3RpY3MiID0+IFsKCiAiaW50ZXJuYWxfYXJlYSI9PgogICAgIFsKICAgICAgMD0+ICJtZXNhIGRlIG1hZGVpcmEiLAogICAgICAxPT4gImFyZWEiCiAgICBdLAogICAgIm9wdGlvbnMiPT4KICAgICBbCiAgICAgIDA9PiAiMiBhbmRhcmVzIiwKICAgICAgMT0+ICJiYW5oZWlybyBleHRlcm5vIiwKICAgICAgXQogICBdCiAgIF1dOwogICAKICAgCmFycmF5X3dhbGtfcmVjdXJzaXZlKCRhcnJheSwgZnVuY3Rpb24gKCRpdGVtLCAka2V5KSAKewogICAgZ2xvYmFsICRDaGFyYWNlcmlzdGljczsKICAgIGlmICghIGlzX2FycmF5KCAkaXRlbSApICkgCiAgICAJJENoYXJhY2VyaXN0aWNzW10gPSAkaXRlbTsKfSk7CgokcmVzdWx0ID0gYXJyYXkoICJDaGFyYWNlcmlzdGljcyIgPT4gJENoYXJhY2VyaXN0aWNzICk7Cgp2YXJfZHVtcCgkcmVzdWx0KTs=