You are not logged in.
Pages: 1
GetValueByPath can easily handle a path such as 'Item.0,Name', where the second part is an array index.
However, when starting of an array with, 0.Name would work, if it were not for the check
if (cardinal(VType) <> DocVariantVType) or
(not IsObject) then
Changing that to
if (cardinal(VType) <> DocVariantVType) or
(not (IsObject or IsArray)) then
it works perfectly.
Regards,
Daniel
Last edited by sakura (2024-04-24 07:53:08)
Offline
Please try with
https://github.com/synopse/mORMot2/commit/ec18e567
Offline
Now IDocDict doesn't work correctly, use "exists" to check for existing keys and always return false
Offline
@lfyey121
Please refine your statement, with a https://stackoverflow.com/help/minimal- … le-example
Exists() is tested and works.
https://github.com/synopse/mORMot2/blob … .pas#L4134
If you want to use paths, you need to enable it setting the PathDelim property to the delimiter char, typically '.' or '/';
Offline
Sorry, my mistake, my json file format is corrupted.
Offline
Pages: 1