jsonLogic support for array operations like "some" #634
-
Given the structure of our source data, we'd need to deal with Array operators from jsonLogic. Checking in the code, there is some commented code related to unused operations in this file Are they not supported due to any known issue? Or just that this requirement was not relevant or present at the moment of jsonLogic support implementation? I guess that supporting these kind of operators would require also extra settings in Fields properties? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Your guess about this not being present at the moment of JsonLogic support implementation is correct. I'm pretty sure we could do this, with some caveats. One of those caveats would be that the reverse operation ( Let me see what I can come up with. I'll create an issue from this discussion and track it there (edit: see #635). |
Beta Was this translation helpful? Give feedback.
Your guess about this not being present at the moment of JsonLogic support implementation is correct.
I'm pretty sure we could do this, with some caveats. One of those caveats would be that the reverse operation (
formatQuery(query, 'jsonlogic')
) would almost certainly not yield the same "some"/"all"/"none" rule thatparseJsonLogic
would have parsed, at least by default. The workaround would be to use a custom rule parser and probably a custom rule formatter as well.Let me see what I can come up with. I'll create an issue from this discussion and track it there (edit: see #635).