Description
Gets the time value of the key.
If more than one key with the same name exists, then get the value of 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
Syntax
objectname.GetValueTime ( Key )
Argument |
Description |
---|---|
objectname |
The name of the JSONPackage object |
Key |
A string specifying the key of the item of JsonStringItem type. If more than one key with the same name already exists, the value of the first key will be obtained. |
Return value
Time. Returns the key value if it succeeds. If any argument's value is null, the method returns null. If an error occurs, throw the exception.
Examples
This example obtains the time value of the starttime key from the JSON string.
// Time GetValueTime ( string Key ) Time lt_Start JsonPackage ljpk_User ljpk_User = Create JsonPackage // Loads the JSON string to the JSONPackage object ljpk_User.loadstring( '{"id":100,"name":"Henry.Ken","starttime":"08:02:30","endtime":1543900359 }') // Gets the value of the starttime key: lt_Start = 08:02:30 lt_Start = ljpk_User.GetValueTime("starttime")
See also