In the below sample the alert doument created by the alerting rule, contains 3 documents (json objects) under hits but they are NOT contained in an array , so in Go unable to parse them
Can someone helpme parse the hits documents which comma seperated string of josn objects and are not inside an array
Sample document created by Alert rule type log
Hits
[map[_id:2s3kfXoB2vuM1J-EwpE7 _index:alert-X _score:%!s(float64=1)
_source:
map[@timestamp:2021-07-06T22:16:21.818Z
action_group:query matched
alert_id:query matched
alert_name:alert events login
hits:
{"_index":".ds-logs-events-2021.06.30-000005","_type":"_doc","_id":"S83kfXoB2vuM1J-Eo4_v", ...
{"_index":".ds-logs-events-2021.06.30-000005","_type":"_doc","_id":"Ss3kfXoB2vuM1J-Eo4_v",...
{"_index":".ds-logs-events-2021.06.30-000005","_type":"_doc","_id":"N83kfXoB2vuM1J-EiI2l",...
rule_id:cfb85000-db0e-11eb-83e0-bb11d01642c7
rule_name:alert events login
tags:customer
title:alert 'alert events login' matched query
value:3
]
Getting error
2021/07/07 12:21:19 Error decoding response parse error: expected [ near offset 5818 of '{\"_index\...'
exit status 1
Using official go-elasticsearch
Using easyjson