Dear all =)
I would like to have {{context.hits}} as a JSON array, so I have tried different things.
If I put the following in a Kibana rule body
{"documents":"{{context.hits}}"}
then all the documents are stored as a string. if I do
{"documents":"[ {{context.hits}} ]"}
then it is closer to be an array, but it is still a string.
Question
Is it possible to get the documents in a real JSON array?
Hugs,
Sandra =)
markov00
(Marco Vettorello)
July 22, 2021, 1:35pm
2
I'm not super familiar with rules, but have you tried to just write it without the "
{"documents": {{context.hits}}}
If using the mustache syntax , you should be able to write also non-valid JSON in the text, creating valid ones as output
system
(system)
Closed
August 19, 2021, 1:36pm
3
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.