import { compile, readAttributes, readChildren } from '@datamoc/mw_games/mwl';
const game = compile("[{ tag: 'game', schema: 0.1, children: [{ tag: 'side', id: 1 }] }]");
const sides = readChildren(game.roots[0]!, 'side', (child) => readAttributes(child, { id: { type: 'id' } }));
console.log(sides.value.length); // 1
Collect children without making every game adapter repeat this filter.