Skip to main content
100%

Gist f902e08d16bcdf6441a5cd7d396713ca

✓ Published0🌍 Public
CCarlos-Augusto
Last edited Jan 27, 2022
Created on Jan 21, 2022

This example shows a script that compacts JSON value-set documents from the EU Digital COVID Certificate (DCC) system by extracting active codes and their display names. It processes six files, including vaccine and test-related value sets, using JavaScript’s `require` to load each document. The code defines two functions—`getObjs` for key-value pairs and `getObjCompact` for plain codes—then iterates through the documents to push the filename, the paired object, and the compact list into an output array, which is logged via `console.log`. The script relies on the `activeStatus` flag (set to `false`) to filter entries and produces a structured JSON string for downstream use.

AI-generated description

Similar vizzes