Xojo Documentation
Xojo Documentation
Home
Getting Started
Get Started with Xojo
QuickStarts
Tutorials
Pi Programming
More Guides
Resources
In-Depth Guides
User Guide
Language Reference
Resources
Release Notes
System Requirements
Deprecations
Videos
Feedback
About
Usage
Copyrights and Trademarks
Tools
What links here
Related changes
Special pages
Printable version
Permanent link
Page information
JSONItem.KeyAt
From Xojo Documentation
Method
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.
Example
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"
Categories
:
New2021r1
Methods
API 2.0