Connection Information

To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.

Connection Type

GetChildCount – PB Docs 2021 – PowerBuilder Library

GetChildCount – PB Docs 2021

GetChildCount

PowerScript function

Description

Gets the child item count in a JSON parser object.

Applies to

JSONParser
objects

Syntax

Argument

Description

objectname

The name of the JSONParser object whose item count you
want to obtain.

ParentItemHandle

A long whose value is the handle of the parent item of
JsonObjectItem or JsonArrayItem type.

ParentItemPath

A string whose value is the path of the parent item of
JsonObjectItem or JsonArrayItem type. If a key name contains
“/”, use the escape character “~~/” to replace “/”.

Return value

Long.

Returns the child item count if it succeeds and -1 if an error
occurs. If any argument’s value is null, the method returns null.

Example 1

This example gets the total number of child items according to the
parent item handle and then gets the values of child items in a
loop:

Example 2

This example gets the total number of child items according to the
parent item handle and then gets the value of every array item in a
loop:

Example 3

This example gets the total number of child items according to the
parent item path and then gets the value of every array item in a
loop:

See also

GetChildItem

GetChildKey


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x