I'm using gsub and regex to structure a field into json. Unfortunately, I'm having problems with double-quotes being escaped in the output. For example:
Field: event
Value: 'success': True
"event", "'", "\"",
Expected output "success": True
Actual output:
Kibana Table format
![]()
Kibana JSON format
![]()
Logstash pipeline config:

If I change the pipeline config and omit the escaping backslash character, Logstash throws an error: Expected one of [ \\t\\r\\n], \"#\", \"{\", \",\", \"]\" at line 215, column 29
Am I escaping special characters wrong with gsub?