Fix checkJsonIds to work with multiple IDs