$balance = function($alias) use ($json) {
$Array = json_decode($json, true)["accounts"];
$key = array_search($alias, array_column($Array, "alias"));
return $key && isset($Array[$key]["balance"]["amount"])?$Array[$key]["balance"]["amount"]:null;
};
var_dump($balance("qw_wallet_rub"));
var_dump($balance("mc_beeline_rub"));