Last active
October 25, 2023 07:44
-
-
Save Roberto-Gentili/8a5a6793cb1282360db7b74b4a4e3568 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Searching for the first occurrence by path suffix | |
ObjectHandler sportOH = finder.findFirstForPathEndsWith("sport"); | |
//Retrieving the path of the sport object ("quiz.sport") | |
String sportPath = sportOH.getPath(); | |
//Retrieving the value of the sport object | |
Sport sport = sportOH.getValue(); | |
ObjectHandler option2OfSportQuestionOH = finder.findFirstForPathEndsWith(Path.of("sport", "q1", "options[1]")); | |
String option2OfSportQuestionOHPath = option2OfSportQuestionOH.getPath(); | |
String option2OfSportQuestion = option2OfSportQuestionOH.getValue(); | |
ObjectHandler questionOneOH = finder.findForPathEquals(Path.of("quiz", "sport", "q1")); | |
String questionOnePath = questionOneOH.getPath(); | |
Question questionOne = questionOneOH.getValue(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment