How to decode value from json, php ios swift : hi friends i am new in php can you please help me to decode the below json from a mobile app

    Array
    (
        [{"unm":"admin","pw”:”password”}] => 
    )

 and my php code is

    $obj1 = print_r($_REQUEST, true); //get $_request variable data(responce of login) data as it is
    foreach($obj1 as $key => $value)
    {
    	$obj2 = $key; //get first key
    }
    $obj3 = json_decode($obj2); //decode json data to obj3
    
    $mob_user_name = $obj2['unm']; //getting json username field value
    $mob_user_pass`enter code here`word = $obj2['pw']; //getting json password field value
 anyone please help me to decode this json to