quite frequently I want to inspect JSON in my terminal.Whenever I get json formatted data from the stdin, I just pipe it to fx (https://github.com/antonmedv/fx) and happily disect it. Sometimes I'd like to search through the object in the node js repl though.Is there a way to get stuff from stdin stored in a variable and start the repl?like so:`cat something.json | node --someoptions "x"`and if something.json contains{"a": 7}this will start node in the repl with these first lines> let x = {"a": 7}>and I can continue using x as an variable?I'm quite sorry for my bad english, it isn't my mothertongue and feel quite worn down from a lomg day, so that's why I'm explaining things so overly complicated. Hope you don't mind this, thank you for reading through this.Have a beautiful day!
Submitted July 16, 2019 at 04:19PM by sombrastudios
No comments:
Post a Comment