def _where_location(record: dict, item: str, last_section_title: str, last_subsection_title: str) -> dict:
    """Get information where a parsed item should be stored in the resulting JSON."""
    where = record[item]

    if last_section_title:
        if last_section_title not in where:
            where['@sections'] = {}
        where = where['@sections']

        key = last_section_title
        if key not in where:
            where[key] = {}
        where = where[key]
    else:
        if '@top' not in where:
            where['@top'] = {}
        where = where['@top']

    if last_subsection_title:
        key = '@subsections'
        if key not in where:
            where[key] = {}
        where = where[key]
        if last_subsection_title not in where:
            where[last_subsection_title] = {}
        where = where[last_subsection_title]

    return where