Fixed mirroring - made collections work
diff --git a/templates/query.html.ep b/templates/query.html.ep
index a25a5e5..b3e52fd 100644
--- a/templates/query.html.ep
+++ b/templates/query.html.ep
@@ -1,9 +1,9 @@
-% use Mojo::JSON;
+% use Mojo::JSON 'encode_json';
-%= javascript begin
- KorAP.currentQuery = <%== Mojo::JSON::encode_json(search->query_jsonld) %>;
-% end
-
-<pre>
-%== search->api_response
-</pre>
+% if (search->api_response) {
+%= javascript begin
+% my $kq_hash = search->api_response;
+% $kq_hash->{matches} = ["..."];
+ KorAP.koralQuery = <%= b(encode_json($kq_hash))->decode %>;
+% end
+% };