jwadhams / json-logic

Build complex rules and serialize them to JSON
MIT License
114 stars 13 forks source link

Question regarding result consistency for <= and == with arrays #14

Open csknns opened 5 years ago

csknns commented 5 years ago

I was trying to implement a jsonlogic library in Swift, and I wanted the library to provide results similar to your json-logic. Playing around in http://jsonlogic.com/play.html I found that: { "<=" : [[1], [1]] } results in true but { "==" : [[1], [1]] } results in false and { "===" : [[1], [1]] } results in false and { "<" : [[1], [1]] } results in false

I am trying to understand if this the correct and intended behavior, because it is hard to wrap my head around these results.