Skip to main content
%GetTypeOf()

Given a valid object key or array index, returns a string indicating the datatype of the value. See “Working with Datatypes” for details and examples.

   method %GetTypeOf(key) as %String

parameters:

  • key — the object key or array index of the value to be tested.

return values:

One of the following strings will be returned:

  • "null" — a JSON null

  • "boolean" — a zero (“false”) or non-zero (“true”) numeric value

  • "number" — any canonical numeric value

  • "oref" — a reference to another object

  • "object" — a nested object

  • "array" — a nested array

  • "string" — a standard text string

  • "unassigned" — the property or element exists, but does not have an assigned value

see also: %IsDefined()

class reference: %DynamicAbstractObject.%GetTypeOf()Opens in a new tab


FeedbackOpens in a new tab