From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

JSONItem.KeyAt(Index As Integer) As String

New in 2021r1

Supported for all project types and targets.

Returns the name of a child key by index. Array items will return an empty string.


Var person As New JSONItem

// This object is manipulated like a dictionary
person.Value("Name") = "John Doe"
person.Value("Age") = 32
person.Value("Married") = True
person.Value("Spouse") = "Jane Doe"

Var s2 As String
s2 = person.KeyAt(1) // returns "Age"