I have a function in php that returns this json array, this is the function
$token = $db->getTokenFromEmail($email);
echo $token;
and this is what i get:
[{"unique_id":"cBuJ-xsDDAo:APA91bHYgPwuwXGVxNMuW_Xs0u5bvbr_QSJq8G1_tZ-nGHOdRB0Nv5ijb2BcaP_wUkpyxwERo7cuQxj89YHjOZdIeIwBOGyeHMP_Ywkg_mocfZQr-CxOzy41i8GKj3X6WFjLZJU4ZcbK"}]
My question is how can I get the value (cBuJ-xsD...)? I have tried this but it doesn't work
$obj = json_decode($token,true);
echo $obj['unique_id'];
print_rit, and you'll see the structure