thedevsaddam / gojsonq

A simple Go package to Query over JSON/YAML/XML/CSV Data
https://github.com/thedevsaddam/gojsonq/wiki
MIT License
2.18k stars 140 forks source link

Node names with "." characters in them, like foo.example.com #54

Closed davecb closed 5 years ago

davecb commented 5 years ago

I'n looking at ansible inventory data containing hostnames, of the form "a192.example.com", and wonder how to express a query in gojsonq, for a datum such as "_meta.hostvars.a001.example.com.ZA_SERVER", which has the expected value of "zabbix.example.com"

Right now, it returns the empty string (;-))

thedevsaddam commented 5 years ago

UseSetSeparator method https://github.com/thedevsaddam/gojsonq/wiki/Configurations#custom-separator

gojsonq.New(gojsonq.SetSeparator("->"))
davecb commented 5 years ago

Thanks!