adobe / json-formula

Query language for JSON documents
http://opensource.adobe.com/json-formula/
Apache License 2.0
19 stars 8 forks source link

Array and object `search` in "contains" #158

Closed Eswcvlad closed 4 months ago

Eswcvlad commented 4 months ago

In the current version the following expressions do not throw a TypeError and return an odd result:

Seems like a valid use case tbh.

JohnBrinkman commented 4 months ago

Documentation says the second parameter must be one of: string|boolean|number|null, but the implementation allows any. We can fix this by either changing the documentation to be more premissive, or the implementation to be more strict...