In order:
-
Extract column data from the database.
"SELECT column FROM table WHERE id = 1 LIMIT 1"
-
JSON_decode
data into a set of PHP values/objects/arrays/whatever.$array = json_decode($OutputRow['column'],true);
-
Update the value(s) you need to update.
$array['permissions']['permission2'] = true;
-
Recompile into a JSON string using
JSON_encode
.$data = json_encode($array);
-
Update the database (SQL?) with the new JSON_encoded string.
"UPDATE table SET column = :data WHERE id = 1 LIMIT 1"
My examples use PDO and MySQL by reference but does not go into any details about database interaction as you've not given any details as to how you're reaching your database. It's only a ballpark rough example of how to do the points listed.