I learned that

PHP Code:
json_decode($userinfo); 
will decode the json string as object

PHP Code:
json_decode($userinfotrue); 
will decode the json string as array..

For some reason I'm able to extract the json string as array but when I try it to do it as object it breaks. Do you have any idea why?

Thanks