how to get item name by index

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Ktotoetoia

hi, how can i get item name by index in itemlist?

:bust_in_silhouette: Reply From: Ninfur

To get the value of an Array, do

var array = [1, 2, 3, 4]
print(array[0]) # 1

To get the key (“name”) of a Dictionary, do

var dictionary = {"One": 1, "Two": 2,}
print(dictionary.keys()[0]); # One