Script for analyzing JSON group data