Skip to content

get_by_str_path returns None for root element of a tree #706

@mwildehahn

Description

@mwildehahn

https://discord.com/channels/1069799218614640721/1324562635420733440/1359060718241976390

In [70]: doc.get_deep_value()
Out[70]:
{'test': {'root': [{'parent': None,
    'meta': {},
    'id': '1@1550711757748329106',
    'index': 0,
    'children': [{'parent': '1@1550711757748329106',
      'meta': {'hi': 'world'},
      'id': '2@1550711757748329106',
      'index': 0,
      'children': [],
      'fractional_index': '80'}],
    'fractional_index': '80'}]}}

In [73]: print(doc.get_by_str_path('test/root/0'))
None
In [103]: print(doc.get_by_str_path('test/root/0/0'))
<builtins.ValueOrContainer_Container object at 0x110f82d30>

In [104]: print(doc.get_by_str_path('test/root/0/0').container)
<builtins.LoroMap object at 0x111afabe0>

In [105]: print(doc.get_by_str_path('test/root/0/0').container.get_deep_value())
{'hi': 'world'}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions