Use event index for JSON export. Fixes #17