antonmedv / fx

Terminal JSON viewer & processor
https://fx.wtf
MIT License
19.08k stars 438 forks source link

TypeError on deep nullish properties #122

Closed sirian closed 4 years ago

sirian commented 4 years ago

image

antonmedv commented 4 years ago

And what would you expect? This is JavaScript. You can use for example lodash for working with it.

echo '{}' | fx '_.get("x.y")'
sirian commented 4 years ago

Maybe at least add support for optional chaining? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining

SmartSelect_20191219-183734_JuiceSSH

antonmedv commented 4 years ago

When it’s landed in Nodejs it will be available