Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Inconsistency in the representation of the path property for nested objects in rules #67

Open
bailarohit55 opened this issue Jan 4, 2024 · 2 comments
Assignees

Comments

@bailarohit55
Copy link

bailarohit55 commented Jan 4, 2024

When creating rules manually in code, I use '$.' to denote the outermost object in the path property of a condition, following the json-rules-engine documentation. However, I’ve noticed that when I create a rule for a nested property using the editor, it prepends the path with '.' instead of '$.'. This inconsistency is confusing and could potentially lead to errors. Could you please clarify the correct usage or consider aligning the editor’s behaviour with the json-rules-engine documentation?
Also, thank you for the editor. It has helped 👍

@vinzdeveloper
Copy link
Owner

Thanks for spotting. i agree, it should go with "$." when processing path params of object. it will be fixed in next version.

@vinzdeveloper vinzdeveloper self-assigned this Jan 4, 2024
@bailarohit55
Copy link
Author

Great! Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants