• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Jj Roberts
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Himai Minh
  • Carey Brown
  • salvin francis

Loop through a JsonNode and its fields [Kotlin]

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
my requirement is to be able to loop through the following JsonNode and its elements:



Each iteration should present a JsonNode with its elements until no JsonNode object is found. I have started with the following:



Is this a valid approach? Ultimately, I would like to get each element in the JsonNode with its associated values. Ideally, my function should return a JsonNode. Down the line, I would also like to use the id in a repository query, so what would be the best approach? Shall I convert it into a Map? Something along these lines:



Can you help? I am not quite sure how to go about it.

Thank you
 
But how did the elephant get like that? What did you do? I think all we can do now is read this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic