Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unless you have syntax-aware grep support, I don't see how searching nested key json could be better. But grep is the default installed. Not to mention ad-hoc languages that does not have any IDE support.


If you put a lot of arbitrary constraints to not allow it to be better, sure. Enjoy.


There is no conflict between improving tools and learning how to express your code in such a way that as many tools as possible work better OOTB.


gron makes nested JSON greppable https://github.com/tomnomnom/gron


`gron` is so underrated. Usually when I try to show people who useful it is they don't seem to understand how powerful it is. One common use is showing how to customize only one part of a helm chart by checking values of an already installed chart:

    $ helm get values -n $NS $DEPLOYMENT -o json | gron | grep resources | gron -u | json-to-yaml.py
    elasticsearch:
      client:
        resources:
          limits:
            cpu: 3
            memory: 4Gi
          requests:
            cpu: 1
            memory: 2Gi
      data:
        resources:
          limits:
            cpu: 6
            memory: 6Gi
          requests:
            cpu: 200m
            memory: 2Gi
    fluentd:
      resources:
        limits:
          memory: 768Mi
        requests:
          memory: 384Mi
That snip could be provided to another team or a customer as a yaml file that could be included with `helm upgrade -f whatever.yaml`. This is soooo much easier than digging that limited set of data out of the much more detailed data.


> ad-hoc languages

This is self-inflicted.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: