Skip to content

Uable to access nested json field #4

Open
@grzegorz-taramina

Description

@grzegorz-taramina

Hi,
I'm trying to use json logic scala for very common case which is accessing field in nested data object.

I have the following data structure:
{ "booking" : { "ref" : 123 }, "test" : 666 }

And the following rule:
{ "<" : [ { "var" : "booking.ref", "type" : { "codename" : "int" } }, { "var" : "test", "type" : { "codename" : "int" } } ] }

Deserialization fails becasue I don't have "booking.ref" field in my data strucutre but I do have booking \ ref.
Does that mean json-logic-scala can only handle root level data fields?
When I change "booking": { "ref":"..." } to "booking.ref" : 444 it works but it's really not what I need.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions