Closed librasteve closed 2 years ago
Could it be that rakudo/src/nqp-2022.07/nqp-2022.07/src/vm/js/nqp-runtime/tables/shiftjis.json
is not a Hash
at the top level? But an Array
?
If that is the case, then maybe your pattern should be '{ try .<name> }'
?
Or something like '{ (try .<name>) // "(unknown)" }'
oh ok - sure that works
rak --json-per-file '{try .<name> // "(unknown)"}' --unique
works beautifully
I was blindly following the example you gave in your blog...
https://dev.to/lizmat/its-time-to-rak-part-1-30ji
I will make a comment now and close this as a code issue
The example in the blog assumed that all JSON files were structured the same way. If they are not, you need to guard against that. I've considered auto-guarding against it, but then the file would just be silently ignored. Which could be worse, or better. YMMV :-)
Hi
I am working (slowly) through your examples in the blog part I and have the below error.
Basically this is a docker image with just rakudo installed on ubuntu:latest https://github.com/p6steve/raku-Dockerfiles/tree/main/basic-ma
Welcome to Rakudo™ v2022.07. Implementing the Raku® Programming Language v6.d. Built on MoarVM version 2022.07.
My search target is ~/rakudo (the target dir for the rakudo build since those are the only files I have in this build) ;-)
I am hoping to install this cool tool everywhere so thus the shakedown...
~p6steve