Refactored json quiz object creation to a helper method