Description
Gets the total number of keys.
Applies to
JSONPackage objects
Syntax
objectname.KeyCount ( )
Return value
Long.
Returns the number of keys if it succeeds and -1 if an error occurs.
Examples
This example sets the value for keys and then gets the number of keys:
long ll_KeyCount datastore lds_employee datawindowchild ldwc_active JsonPackage lnv_package lnv_package = create JsonPackage ...//Initialize data for lds_employee, ldwc_active // package the data lnv_package.SetValue("d_department", dw_department, false) lnv_package.SetValue("d_employee", lds_employee) lnv_package.SetValue("dddw_active", ldwc_active, false) // ll_KeyCount will return 3 ll_KeyCount = lnv_package.KeyCount()