Open jrodriguez-rc opened 2 years ago
Do you mean without filter ? https://github.com/sbcgua/ajson#predefined-filters
Also:
false
empty ? Or null
? Or 0
. I think not always.I would go with the most famous isEmpty implementation: https://github.com/lodash/lodash/blob/main/src/isEmpty.ts
It's working differently now:
I changed my custom empty filter to the following which also removes null
and initial numbers (zero).
rv_keep = boolc(
( iv_visit = zif_ajson_filter=>visit_type-value AND
( is_node-type = zif_ajson_types=>node_type-string AND is_node-value IS NOT INITIAL OR
is_node-type = zif_ajson_types=>node_type-boolean OR
is_node-type = zif_ajson_types=>node_type-number AND is_node-value <> 0 ) ) OR
( iv_visit <> zif_ajson_filter=>visit_type-value AND is_node-children > 0 ) ).
This new option will skip all the nodes that have no content: