I have a silly question. I am trying to code a s...
# getting-started
j
I have a silly question. I am trying to code a small app/script where I parse a Json and play with it. Json is very deep. in Python I can do something like pages = json["document"]["children"][0][0] Is there a way to do and simplify something like that in Kotlin, too? I am using kttp Library so I have a JSOnObject.
m
For deeply nested structures, you can try some JSONPath implementations. (
$.document.children[0][0]
)
j
I will give it a try and see how it goes