-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option for selecing an element of the JSON tree #3
Comments
+1 I was about to open the same issue. For people just trying to use this as a one-liner (which is probably >90% of people arriving here), forcing them to dive into the JSON tree with It would be great if the use case of "just get me the raw city, country for this IP" is covered without needing external commands. $ mmdbinspect -db somedb.mmdb -format '{.city.names.en}, {.country.names.en}' 123.123.123.123
Transylvania, Romania |
Thanks for the feedback! Something like you describe sounds useful, although having something flexible enough for all use cases might be a challenge. We could probably expand the examples to cover some more cases as a step in this direction. |
This comment was marked as off-topic.
This comment was marked as off-topic.
In the mindset of "Do One Thing And Do It Well", I think it would suffice to show some examples in the examples section of the README.md on how to extract some common queries using jq and link to the jq tutorials for advanced use cases. |
somehow convinced if I compare sniplets extracting the country code from the past (GeoIP v1):
with present (GeoIP v2 / MMDB)
or
Advertisment:
BTW:
|
I don't know how others are thinking about, but having the option to lookup a dedicated element of the JSON treen and return this in a simple output line (optionally with element=value to be used in "eval") would be a great advantage for any script related action to avoid using any sophisticated pipe methods e.g. in Bash to get the value of one element...
The text was updated successfully, but these errors were encountered: