# List Key of Json

**URL:** <https://community.thunkable.com/t/list-key-of-json/2272944>\
**Category:** Questions about Thunkable X\
**Created:** [February 12, 2023, 8:31am UTC](https://community.thunkable.com/t/list-key-of-json/2272944 "2023-02-12T08:31:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom.garnier](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tom.garnier/32/147757_2.png) [@tom.garnier](https://community.thunkable.com/u/tom.garnier)\
**Post date:** [February 12, 2023, 8:31am UTC](https://community.thunkable.com/t/list-key-of-json/2272944/1 "2023-02-12T08:31:42Z")

</div>

Hello,  
I have a JSON, and I would like to list all key of items there are here, not the value of an element, but the key, there is a manner to do this?  
Thank

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [February 12, 2023, 9:38am UTC](https://community.thunkable.com/t/list-key-of-json/2272944/2 "2023-02-12T09:38:48Z")

</div>

cut n paste a copy of the returned json string and post it here - firstyou highlight it and apply the pre-ormatted text option on it (see option in gear icon) and post the raw json text here and we will see what approach to take below is an example.

```auto
{"type":"bar","data":{"labels":["Q1","Q2","Q3","Q4"],"datasets":[{"label":"sales","data":["91","60","70","100"]},{"label":"profit","data":["78","80","78","90"]}]},"options":{"scales":{"yAxes":{"stacked":true},"xAxes":{"stacked":true}}}}

```

---

<div class="post-metadata">

**Author:** ![tom.garnier](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tom.garnier/32/147757_2.png) [@tom.garnier](https://community.thunkable.com/u/tom.garnier)\
**Post date:** [February 12, 2023, 9:46am UTC](https://community.thunkable.com/t/list-key-of-json/2272944/3 "2023-02-12T09:46:03Z")

</div>

I don’t know if is that you want, but, this my json:

```json
{
	"user_id": {
		"class": {
			"lessons": {
				"class_name": {
					"student 1": {
						"time": 0,
						"answers": "1,2,3,4"
					},
					"student 2": {
						"time": 0,
						"answers": "1,2,3,4"
					},
					"student 3": {
						"time": 0,
						"answers": "1,2,3,4"
					},
					"student 4": {
						"time": 0,
						"answers": "1,2,3,4"
					}
				}
			}
		}
	}
}

```

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [February 12, 2023, 10:07am UTC](https://community.thunkable.com/t/list-key-of-json/2272944/4 "2023-02-12T10:07:59Z")

</div>

what kind of list are you expecting to receive?

---

<div class="post-metadata">

**Author:** ![tom.garnier](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tom.garnier/32/147757_2.png) [@tom.garnier](https://community.thunkable.com/u/tom.garnier)\
**Post date:** [February 12, 2023, 10:09am UTC](https://community.thunkable.com/t/list-key-of-json/2272944/5 "2023-02-12T10:09:55Z")

</div>

I Would like to receive first in a list (list viewers object) list of lessons, next list of classes, and to finish, to show list of students who send their data

---

<div class="post-metadata">

**Author:** ![tom.garnier](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tom.garnier/32/147757_2.png) [@tom.garnier](https://community.thunkable.com/u/tom.garnier)\
**Post date:** [February 12, 2023, 1:27pm UTC](https://community.thunkable.com/t/list-key-of-json/2272944/6 "2023-02-12T13:27:14Z")

</div>

Please @manyone

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [February 13, 2023, 1:47am UTC](https://community.thunkable.com/t/list-key-of-json/2272944/7 "2023-02-13T01:47:06Z")

</div>

like this?

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/3/531727b3a7a2d49d354e319a9f34b6698cb08ab6.png)

here are the blocks

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/2/92a13fc7d647a2b744588255aa6bb89822603818.png)

the outcome is a text so you should run it thru the list\_from\_text block using delimiter “|” to get a list.

i also cheated - i already know what names are the various columns so i hardcoded the property values

[https://x.thunkable.com/copy/e1ab4a41276e3f8950dcf74ce1c7c8b5](https://x.thunkable.com/copy/e1ab4a41276e3f8950dcf74ce1c7c8b5)

It looks like it requires a recursuve solution, which i s difficult for me to arrive at at this time.

Maybe someone else may find the recursive answer easily.

---

<div class="post-metadata">

**Author:** ![tom.garnier](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tom.garnier/32/147757_2.png) [@tom.garnier](https://community.thunkable.com/u/tom.garnier)\
**Post date:** [February 13, 2023, 6:52am UTC](https://community.thunkable.com/t/list-key-of-json/2272944/8 "2023-02-13T06:52:54Z")

</div>

No, I would like Thunkable show a list viewer of different lessons, next user click, show list of different class, user pick one, and it show a table of different value of each students

User\_id it is the identifiant of user by firebase and first “class” key it’s to sey that you need to get these value

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [February 13, 2023, 8:23am UTC](https://community.thunkable.com/t/list-key-of-json/2272944/9 "2023-02-13T08:23:47Z")

</div>

I’ve given you most of the tools you’ll  
need. The first item in the list builder block returns the classes for a user\_id. Just put them in a list viewer.  
After pick an entry, goto a new screen where there’s a new list viewer whose elemenr entriesc are from the 2nd item in my.list builder block, etc. Doi the same process for the remaining levels.  
Hint. Include the “path” ( eg. User\_id…class…lessons… ) at the top of every screen and append the current elemenr to the new path in the next screen. Note; the path is the string that appears in get\_property block. Good luck!

---

<div class="post-metadata">

**Author:** ![tom.garnier](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tom.garnier/32/147757_2.png) [@tom.garnier](https://community.thunkable.com/u/tom.garnier)\
**Post date:** [March 12, 2023, 7:28pm UTC](https://community.thunkable.com/t/list-key-of-json/2272944/10 "2023-03-12T19:28:28Z")

</div>

Thank, get\_propriety block work perfectly  
Thank you very much

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [June 10, 2023, 7:28pm UTC](https://community.thunkable.com/t/list-key-of-json/2272944/11 "2023-06-10T19:28:29Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
