Open samarth202 opened 2 years ago
It looks like for the java package, each merge
needed at least an empty array []
for it to work consistently as the playground and js
{"if":[true,{"merge":[[],{"merge":[[],{"map":[{"filter":[{"var":"parentObject.childObject.array"},{"===":[{"var":"type"},"SOME_TYPE"]}]},["fee","SOME_TYPE",{"*":[{"var":"amount"},0.01]}]]}]}]},[]]}
The if
s in the reproduction make this really hard to read. Can you reduce the testcase down? json-logic is hard to read.
Description
Seeing an issue with the java library (v1.0.7) when logic should have returned an array of arrays but returned just an array
Input
Logic
Returns
Problem:
According to JSONLogic Playground and the js library, it should have returned an array of arrays
Code (Kotlin)