Extract fields from a field and add the total count

I have this logs (json format) imported into elastic via logstash.

"fields.models": "{'msp': '1', 'tcl': '1'}",

with logstash, how do we extract the model name and calculate the total count
The desired output should appear as follows:

model_name : msp, tcl
model_count: 2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.