MiSawa / xq

Pure rust implementation of jq
MIT License
333 stars 18 forks source link

flatten/1 on empty array emits null instead of [] #98

Closed itchyny closed 2 years ago

itchyny commented 2 years ago

The flatten filter on empty array should emit an empty array.

❯ jq -n '[] | flatten(0)'
[]

❯ xq -n '[] | flatten(0)'
null

❯ xq --version
xq 0.2.10-ad33a92d252fc4842f10730973e16f5da8434035