From 022aeac808b9bc37423b6899281f1d977a4763fc Mon Sep 17 00:00:00 2001 From: Lei Wang Date: Thu, 26 Mar 2020 18:45:57 -0700 Subject: [PATCH] Stringify nested JSON object --- meilisearch-http/public/interface.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meilisearch-http/public/interface.html b/meilisearch-http/public/interface.html index e58050eac..c36ae4093 100644 --- a/meilisearch-http/public/interface.html +++ b/meilisearch-http/public/interface.html @@ -215,7 +215,11 @@ const content = document.createElement('div'); content.classList.add("content"); - content.innerHTML = element[prop]; + if (typeof (element[prop]) === "object") { + content.innerHTML = JSON.stringify(element[prop]); + } else { + content.innerHTML = element[prop]; + } field.appendChild(attribute); field.appendChild(content);