Replace all occurrences of '2022' with '2023' in the JSON field 'event_date' of the 'events' table, and extract the modified JSON field as text.
CREATE TABLE events (data JSON); INSERT INTO events (data) VALUES ('{"event_date": "2022-01-01"}'), ('{"event_date": "2022-12-31"}'), ('{"event_date": "2022-07-04"}');
```sql
SELECT json_replace(data::text, '"2022"', '"2023"') AS modified_data
FROM events;
```
```sql
SELECT json_replace(data::text, '"2022"', '"2023"') AS modified_data
FROM events;
```