vinzdeveloper / json-rule-editor

Json rule editor
GNU General Public License v3.0
374 stars 110 forks source link

Is it possible make value as a dynamic data like using path? #28

Closed intermx-reddysai closed 3 years ago

intermx-reddysai commented 3 years ago

Example:

conditions: {
    all: [{
      fact: 'account-information',
      operator: 'equal',
      value: 'microsoft', // **Is it possible make this value 'microsoft' as a dynamic content?**
      path: '$.company' // access the 'company' property of "account-information"
    }]
  },
  event: {
    type: 'microsoft-christmas-pto',
    params: {
      message: 'current microsoft employee taking christmas day off'
    }
  }
vinzdeveloper commented 3 years ago

hey @intermx-reddysai

Please refer the below documentation to handle path variable logic.

https://vinzdeveloper.github.io/json-rule-editor/docs/advanced.html