{% set ns = namespace(people={}) %}
{% for person in site.ancestry.people.values() %}
    {% set person_label %}
        {% with embedded=True %}
            {% include 'label/person.html.j2' %}
        {% endwith %}
    {% endset %}
    {% do ns.people.update({
        person.id: {
            'id': person.id,
            'label': person_label | striptags,
            'url': person | url,
            'parentIds': person.parents | map(attribute='id') | list,
            'childIds': person.children | map(attribute='id') | list,
        }
    }) %}
{% endfor %}
{{ ns.people | json }}
