Calling val out of the function that I defined it in

Hi everyone.
I am new to kotlin. My group is going to build a questionnaire app with kotlin.
I have a google spread sheet on the google drive and I am going to get the data from the spread sheet and show it in the app question by question, page by page. I have wrote the code to get the data in Json format and parse it with the function parseItem. However, I have meet two problem when I move on.

i) I have set the numbers of val such as queContent, ChoiceA… in the parseItems, however, I cannot call it out when I am out of the function parseItems. It needs member declaration again. I am wonder is there any way for me to call back all my val define in the parseItems when I am out of it.

ii) Is there any way that I can show it page by page instead of list them all out in a single page?

Please help if anyone of you have done somethings similar before. Many Many thanks!!

Belows are the parseItems code:

class ListItem : AppCompatActivity() {

private lateinit var listView: ListView
private lateinit var adapter: ListAdapter
private var loadingsyb: ProgressDialog1? = null

override fun onCreate(savedInstanceState: Bundle?) {
    listView = findViewById<ListView>(

 private fun parseItems(jsonResponse: String) {

    val list = ArrayList<HashMap<String, String>>()
    val jobj = JSONObject(jsonResponse)
    val jarray = jobj.getJSONArray("items")
    var corrAns = Array(jarray.length()) { i -> " $i" }

    try {

        for (i in 0 until jarray.length()) {
            val jo = jarray.getJSONObject(i)
            val queNo = jo.getString("queNo")
            val queContent = jo.getString("queContent")
            corrAns[i]  = queContent
            val choiceA = jo.getString("choiceA")
            val choiceB = jo.getString("choiceB")
            val choiceC = jo.getString("choiceC")
            val choiceD = jo.getString("choiceD")

            val item = HashMap<String, String>()
            item["queNo"] = queNo
            item["queContent"] = queContent
            item["choiceA"] = choiceA
            item["choiceB"] = choiceB
            item["choiceC"] = choiceC
            item["choiceD"] = choiceD


	catch (e: JSONException) {

            adapter = SimpleAdapter(
                this, list, R.layout.list_item_row,
                arrayOf("queContent", "choiceA", "choiceB", "choiceC", "choiceD")

    listView.adapter = adapter