Does it support running rules on complex objects?
See original GitHub issueDoes it support running rules on complex objects? Like running rules on address.country == 'USA"?
{ "name": "test_user", "email_address": "test@gmail.com", "address": { "address_1": "high st", "address_2": "unit-4", "state": "AZ", "country": "USA" } }
Can you give an example as i see complex types are supported
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
java - Drools - Doing Complex Stuff inside a Rule Condition or ...
My question is what should be and shouldn't be done inside a Rule Condition/Consequence. Given that we can write Java directly or call...
Read more >Create custom actions rules in Outlook for Windows
Note: A rule with a custom action runs only on the computer where it is installed and only when Outlook is running. Click...
Read more >Chapter 10: Object-Oriented Programming in LabVIEW
Object-oriented design is supported by a number of languages, including C++ and Java. This book tries to refrain from using rules used specifically...
Read more >Working with objects - JavaScript - MDN Web Docs - Mozilla
An object is a collection of properties, and a property is an association between a name (or key) and a value. A property's...
Read more >Choose when to run jobs - GitLab Docs
The rule matches and the job runs only when there are changes to the files in the branch. Complex rules. You can use...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Cool so it sounds like you’re all set so I’ll close this out. If you have any other questions just post them here or in a new issue if you’d like.
Here’s a larger example using the debug repl.
You can access MAPPING keys using the dot syntax like
mapping.key
, and that’s mostly kept for backwards compatibility purposes. There could be name collisions with attributes though which is why I recommend you use the other syntax likemapping['key']
. The default context should work just fine for this since it uses the getitem resolver.