<?php
$information = array("login" => "someUsername",
"password" => "somePassword",
"card_pin"=>"card_1234",
"pin"=>"pin_356",
"iin" => "iin_123",
"shipping" => array("telephone" => "telephone_998"),
"cardnumber" => "card_number_876",
"customer_id" => "customer_654",
"telephone" => "someOtherTelephoneNumber555");
$json = JSON.stringify($information);
$jsonIterator = new RecursiveIteratorIterator(
new RecursiveArrayIterator(json_decode($json, TRUE)),
RecursiveIteratorIterator::SELF_FIRST);
foreach ($jsonIterator as $key => $val) {
if(is_array($val)) {
echo "$key:\n";
} else {
echo "$key => $val\n";
}
}
preferences:
43.43 ms | 402 KiB | 5 Q