15 lines
452 B
TypeScript
15 lines
452 B
TypeScript
import { overlayDefinitions } from './src/components/overlays/overlay-definitions';
|
|
|
|
let filters: any[] = ['any'];
|
|
|
|
Object.keys(overlayDefinitions).forEach((key) => {
|
|
const definition = overlayDefinitions[key];
|
|
let filter: any[] = ['in', key];
|
|
Object.keys(definition).forEach((subKey) => {
|
|
filter = [...filter, subKey];
|
|
});
|
|
filters = [...filters, filter];
|
|
});
|
|
|
|
console.log({ overlayDefinitions, filters, json: JSON.stringify(filters) });
|