From Xojo Documentation

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

JSONItem.Keys() As String()

New in 2021r1

Supported for all project types and targets.

Returns the keys of the children. Array items will not be included.


This example populates a String array with the keys of the person JSONItem.

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 people() As String
people() = person.Keys // the array will now contain the keys as used above