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

ContainsKey – PB Docs 2018 – PowerBuilder Library

ContainsKey – PB Docs 2018

ContainsKey

PowerScript function

Description

Checks if the key name exists. It only checks the key at the first
level of the JSON string.

If more than one key with the same name exists, it will only check
the first key. Notice that the IgnoreCase property (true by default)
determines whether the key name will be matched in a case-sensitive
manner.

Applies to

JSONPackage and JSONParser objects

Syntax for JSONPackage

Syntax for JSONParser

Argument

Description

objectname

The name of the JSONPackage or JSONParser object
whose key you want to check.

ParentItemHandle

A long value specifying the parent item handle which
is JsonObjectItem type.

Key

A string specifying the key name.

Return value

Boolean. Returns true if the key exists and false if the key does
not exist. If any argument’s value is null, the method returns
null.

Example 1

This example sets the value for key and then checks if the specified
key exists:

Example 2

This example loads a JSON string into a JSONParser object and checks
if the specified key exists:

See also

SetValue


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