From a php script I'm requesting the keys of a JSON field in a MySQL 8++ database (table) using the JSON_KEYS(specs), which works fine. The result is a string like this $json_keys = '["KEY1", "KEY2", "KEY3", "KEY4"]'
Is there a quick way to convert this into a php array ?
Today i'm doing this $myArray = explode(', ',str_replace(array('[',']','"'), '',$json_keys)); But there must be a better and smarter way to do it.