Need help to modify the Mustache Condition

Hi I have the below mustache script for my slack notification message.

Total hits: {{#ctx.results}}{{#hits}}{{total}}{{/hits}}{{/ctx.results}}
Period start: {{ctx.periodStart}}
Period end: {{ctx.periodEnd}}
Error Details:
{{#ctx.results}}
{{#hits}}
{{#hits}}
{{#_source}}
StoreId: {{StoreId}}
Env: {{Env}}
App: {{App}} :
LogType: {{LogType}}
LogTime: {{LogTime}}
LogDetails: {{LogDetails}}
{{/_source}}
{{/hits}}
{{/hits}}
{{/ctx.results}}
In this alerts are generating for same error for the same Store ID. I am trying to give some condition to filter only one store id with the same error.

Error Output now

Error Details:
StoreId: 32294
Env: prod
App: V2HH :
LogType: PRINTING_ERROR
LogTime: 2020-01-28T21:09:25
LogDetails: Printing Label is failed 2 time and error: Error: Error Domain=UIPrintErrorDomain Code=4 "(null)"
StoreId: 32294
Env: prod
App: V2HH :
LogType: PRINTING_ERROR
LogTime: 2020-01-28T21:08:52
LogDetails: Printing Label is failed 2 time and error: Error: Error Domain=UIPrintErrorDomain Code=4 "(null)"
StoreId: 32294
Env: prod
App: V2HH :
LogType: PRINTING_ERROR
LogTime: 2020-01-28T21:08:33
LogDetails: Printing Label is failed 2 time and error: Error: Error Domain=UIPrintErrorDomain Code=4 "(null)"
Need to display only one error out of these three error. Any suggestions on the mustache script to be modified to?

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