 */}}
    {{- range $key, $param := $hit.Params -}}
      {{- if in $validParams $key -}}
        {{- $dot.Scratch.SetInMap $hit.File.Path $key $param -}}
      {{- end -}}
    {{- end -}}
    {{- $.Scratch.SetInMap "hits" $hit.File.Path (.Scratch.Get $hit.File.Path) -}}
  {{- end -}}
{{- end -}}

{{ $ndJSON := "" }}
{{ range $k, $v := $.Scratch.GetSortedMapValues "hits" }}
  {{ if $k }}
    {{ $ndJSON = print $ndJSON "\n" }}
  {{ end }}
  {{ $ndJSON = print $ndJSON (jsonify $v) }}
{{ end }}
{{ return $ndJS