|
|
@@ -125,14 +125,23 @@ function renderChips(container, obj, memoryMap) {
|
|
|
const chip = el('span', 'chip');
|
|
|
const kEl = el('span', 'k'); kEl.textContent = k + ':';
|
|
|
// console.log("v",v);
|
|
|
- const vEl = el('span', 'v'); vEl.textContent = ' ' + String(v[0]?.value) +' (' +String(v[0]?.source) + ')';
|
|
|
- chip.appendChild(kEl); chip.appendChild(vEl);
|
|
|
- console.log("k",k);
|
|
|
+ let resVal = "";
|
|
|
+ let sourceVal = "";
|
|
|
+ if(v instanceof Array){
|
|
|
+ resVal = String(v.map(v => v.value).join(", "));
|
|
|
+ sourceVal = String(v[0]?.source);
|
|
|
+ const vEl = el('span', 'v'); vEl.textContent = ' ' + resVal +' (' + sourceVal + ')';
|
|
|
+ chip.appendChild(kEl); chip.appendChild(vEl);
|
|
|
+ }
|
|
|
+ // console.log("k",k);
|
|
|
+ if(v instanceof Array){
|
|
|
const was = memoryMap.get(k);
|
|
|
if (was === undefined || was !== v) chip.classList.add('new');
|
|
|
container.appendChild(chip);
|
|
|
memoryMap.set(k, v);
|
|
|
+
|
|
|
count++;
|
|
|
+ }
|
|
|
});
|
|
|
return count;
|
|
|
}
|