Check out example codes for "kotlin jsonobject from string". It will help you in understanding the concepts better.

Code Example 1

val data = JSONObject("""{"name":"test name", "age":25}""")

Learn ReactJs, React Native from akashmittal.com