The example uses JSON_KEYS to get an ordered list of all unique keys from all documents of all rows of a table. The key names returned in the result are not enclosed in double quotation marks.
SELECT distinct(JSONKeys) from JSON_KEYS ( ON (SELECT json_data FROM json_table) USING QUOTES('N')) AS json_data ORDER BY 1;
Result:
JSONKeys -------- base clouds clouds.all cod coord coord.lat coord.lon dt id main main.humidity main.pressure main.temp main.temp_max main.temp_min main.temp_scale name sys sys.country sys.sunrise sys.sunset weather weather[0] weather[0].description weather[0].icon weather[0].id weather[0].main wind wind.deg wind.speed