From: tal@whatexit.org Date: Fri, 3 Apr 2015 13:53:51 +0000 (+0000) Subject: manual.yml: Clarify how to specify keys with ":" and special chars. X-Git-Tag: jq-1.5rc2~119 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6cc00fa7199772dc88dfe086c9289e5524e1742;p=jq manual.yml: Clarify how to specify keys with ":" and special chars. Signed-off-by: Nicolas Williams --- diff --git a/docs/content/3.manual/manual.yml b/docs/content/3.manual/manual.yml index f9fdc03..a19ca6a 100644 --- a/docs/content/3.manual/manual.yml +++ b/docs/content/3.manual/manual.yml @@ -301,6 +301,12 @@ sections: to the last element, -2 referring to the next to last element, and so on. + The `.foo` syntax only works for simply keys i.e. keys that + are all alphanumeric characters. `.[]` works with + keys that contain special charactors such as colons and dots. + For example `.["foo::bar"]` and `.["foo.bar"]` work while + `.foo::bar` and `.foo.bar` would not. + The `?` "operator" can also be used with the slice operator, as in `.[10:15]?`, which outputs values where the inputs are slice-able.