json class : Keys() method

Description

Get a list of member names.

Syntax

jsonInstance.Keys()

Arguments

None

Return value

ClassDescription
list{string}A list of member names.

Sample code

1:

json jsonIns = new json("{@name@:@suzuki@,@age@:1}".Replace("@","".DQ));

2:

list{string} memberNameList = jsonIns.Keys(); // "name", "age"

Notes

If the instance is an JSON array, an exception is raised.

The return value is a list of names of members that are direct children.

Links for reference

None

Copyright © Cooker All rights reserved.