Painless scripting JSON functions

@HDB there are no JSON parsing classes in the Painless API.

To do what you're considering, I think you'll want to re-index that data using Logstash to convert the string field into a JSON object using the JSON filter and dropping fields.

Logstash pipeline: Elasticsearch input --> JSON filter --> Elasticsearch output