Possible to have {{context.hits}} return as an array?

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 =)

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