Merge pull request #1345 from tzz/example/appgroups

examples/appgroups.cf: complex JSON processing
examples/appgroups.cf: improve logic and comments