<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > cJSON > CCJson class > <CCJson>.Path handling > <CCJson>.Path.Name |
Description
Returns text description of the last path element in specified path.
Syntax
pathElementName = <CCJson>.Path.Name(pathSpecification)
Returns
String, last element name in path
Parameters
Name |
Type |
Optional |
Meaning |
pathSpecification |
Tokens |
No |
Path specification further explained in CJSon path specification topic. |
Remarks
Restrictions
See also
Examples
uses "cjson", "console"
dim json as new CCJson ' Create an empty CCJson object
json.Parse("[{""name"": ""Eros""}, {""name"": ""Roberto""}]") ' Parse valid JSON string
printl "Last element is: " + json.Path.Ptr((1).(1)) ' Useful when walking the JSON just via index
' Here we go for the first item in the first array element
' and it will print "name"
waitkey