Updated `post_to_json.py` to sort by group_id.