{"action":"opened","issue":{"url":"https://api.github.com/repos/hashicorp/consul-template/issues/689","repository_url":"https://api.github.com/repos/hashicorp/consul-template","labels_url":"https://api.github.com/repos/hashicorp/consul-template/issues/689/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/consul-template/issues/689/comments","events_url":"https://api.github.com/repos/hashicorp/consul-template/issues/689/events","html_url":"https://github.com/hashicorp/consul-template/issues/689","id":170881401,"number":689,"title":"How to do last kv handling in range tree","user":{"login":"deepagargit","id":13871348,"avatar_url":"https://avatars.githubusercontent.com/u/13871348?v=3","gravatar_id":"","url":"https://api.github.com/users/deepagargit","html_url":"https://github.com/deepagargit","followers_url":"https://api.github.com/users/deepagargit/followers","following_url":"https://api.github.com/users/deepagargit/following{/other_user}","gists_url":"https://api.github.com/users/deepagargit/gists{/gist_id}","starred_url":"https://api.github.com/users/deepagargit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepagargit/subscriptions","organizations_url":"https://api.github.com/users/deepagargit/orgs","repos_url":"https://api.github.com/users/deepagargit/repos","events_url":"https://api.github.com/users/deepagargit/events{/privacy}","received_events_url":"https://api.github.com/users/deepagargit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-12T14:17:47Z","updated_at":"2016-08-12T14:17:47Z","closed_at":null,"body":"I want to remove last comma in range loop.\r\nPlease suggest how to remove it.\r\n\r\n{\r\n                \"id\" : \"cust3\"\r\n**},**\r\n\r\n**Consul Template Version**\r\n$ ./consul-template -v\r\nconsul-template v0.15.0\r\n\r\n\r\n**Template file**\r\nperson.ctmpl\r\n\"person\": [\r\n        {{range tree \"/path/person@dc-public\"}}\r\n        {\r\n                \"id\" : \"{{ .Key }}\"\r\n        },\r\n        {{end}}\r\n]\r\n\r\n\r\n\r\n**Output:**\r\n$ ./consul-template -template person.ctmpl:person.result -dry\r\n> person.result\r\n\r\n\"person\": [\r\n\r\n        {\r\n                \"id\" : \"cust1\"\r\n        },\r\n        \r\n        {\r\n                \"id\" : \"cust2\"\r\n        },\r\n        \r\n        {\r\n                \"id\" : \"cust3\"\r\n        },\r\n        \r\n]\r\n\r\n\r\n"}}
{"actor":{"display_login":"deepagargit"}}