News for hackers. Stuff that matters.

Show HN: JSON-logic-path – JSON logic with jsonpath multi-value resolution

https://github.com/bayinfosys/json-logic-path

The reference Python implementation (nadirizr/json-logic-py) hadn't been updated for modern Python. We forked it to fix that, then added a vars operator backed by JSONPath for multi-value resolution -- useful when branch conditions need to evaluate model outputs or array-valued fields.

Not part of the standard; the var operator is unchanged so existing rules work without modification.

( 1 comment | on HN )
Re:Show HN: JSON-logic-path – JSON logic with jsonpath multi... by glashatay on Saturday April 18, 2026 @04:19PM (#47819197)
interesting approach. how do you handle the branching when jsonpath returns multiple values - do you iterate through them or treat it as a boolean check? asking because i tried something similar with json-logic for routing model outputs and ended up just flattening the array in preprocessing