How to get a database field value from a WordPress table? [closed]

In the first two cases, there’s an array wrapping the object that you have to attend to first. e.g. this should work:

$status = $user[0]->status;

As a sidenote:

In the last case, json_encode() doesn’t, as the name might suggest, turn data into an object with properties that you can access — it turns it into a JSON string. Not very useful here.

You can use json_decode() again to turn the string into an object — but of course why bother, since $user[0] is the object you want in the first place.