假设,我在 php 中有这个数组
$cities=array(
"Caracas"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"Los Teques"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"La Victoria"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"Maracay"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"Tejeria"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"La Encrucijada"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"Cagua"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"Turmero"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"San Mateo"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"Margarita"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
"Valencia"=>array(
"air"=>array(
"4","3-5 Working Days","Saturday"
),
"sea"=>array(
"18","3-5 Days","Wednesday"
)
),
// another section
"Puerto la Cruz"=>array(
"air"=>array(
"4.50","5-10 Working Days","Saturday"
),
"sea"=>array(
"19","4-6 Days","Wednesday"
)
),
"Lecheria"=>array(
"air"=>array(
"4.50","5-10 Working Days","Saturday"
),
"sea"=>array(
"19","4-6 Days","Wednesday"
)
),
"Bacelona"=>array(
"air"=>array(
"4.50","5-10 Working Days","Saturday"
),
"sea"=>array(
"19","4-6 Days","Wednesday"
)
),
"Guanta"=>array(
"air"=>array(
"4.50","5-10 Working Days","Saturday"
),
"sea"=>array(
"19","4-6 Days","Wednesday"
)
),
"Puerto Piritu"=>array(
"air"=>array(
"4.50","5-10 Working Days","Saturday"
),
"sea"=>array(
"19","4-6 Days","Wednesday"
)
),
// another section
"Cumana"=>array(
"air"=>array(
"5.50","5-10 Working Days","Saturday"
),
"sea"=>array(
"19.50","4-6 Days","Wednesday"
)
),
"Anaco"=>array(
"air"=>array(
"5.50","5-10 Working Days","Saturday"
),
"sea"=>array(
"19.50","4-6 Days","Wednesday"
)
),
"Cantaura"=>array(
"air"=>array(
"5.50","5-10 Working Days","Saturday"
),
"sea"=>array(
"19.50","4-6 Days","Wednesday"
)
),
"El Tigre"=>array(
"air"=>array(
"5.50","5-10 Working Days","Saturday"
),
"sea"=>array(
"19.50","4-6 Days","Wednesday"
)
),
// another section
"Maturin"=>array(
"air"=>array(
"6","5-10 Working Days","Saturday"
),
"sea"=>array(
"20","4-6 Days","Wednesday"
)
),
"Punta de Mata"=>array(
"air"=>array(
"6","5-10 Working Days","Saturday"
),
"sea"=>array(
"20","4-6 Days","Wednesday"
)
),
"Ciudad Bolivar"=>array(
"air"=>array(
"6","5-10 Working Days","Saturday"
),
"sea"=>array(
"20","4-6 Days","Wednesday"
)
),
"Puerto Ordaz"=>array(
"air"=>array(
"6","5-10 Working Days","Saturday"
),
"sea"=>array(
"20","4-6 Days","Wednesday"
)
),
"Carupano"=>array(
"air"=>array(
"6","5-10 Working Days","Saturday"
),
"sea"=>array(
"20","4-6 Days","Wednesday"
)
),
);
如何将其转换为每个键相同的 javascript?我想要 javascript 中的相同数组