QuestionQ54

VerifiedSOAR Playbook Development

Refer to the exhibit.

Question Image

What Jinja expression correctly filters the results so that only MD5 hash values are displayed?

Drag & Drop
{{ |. }}
Explanation

The FortiSOAR playbook data is rooted at vars.artifacts.data.results, and the Jinja template has the form {{ <object> | <filter><args>.<attr> }}. You pipe 'vars.artifacts' into the 'json_query' filter, whose JMESPath argument "data.results[?type=='FileHash-MD5']" selects only the entries whose type is FileHash-MD5, then append '.value' to output just the hash strings rather than the whole objects. 'tojson' merely serializes an object to a JSON string and would not extract the hash values, so it is a distractor here. The completed expression is {{ vars.artifacts | json_query("data.results[?type=='FileHash-MD5']").value }}, matching the automated key.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!