type

Modified on Thu, 9 Jul at 10:50 AM

type

TABLE OF CONTENTS

Find the data type of the argument

Definition

string type(any $data)

Returns the data type of the argument.

Parameters

any $data

Data to find the data type of.

Returns

string

String representation of the data type.

Examples

Transformation
{
  a: type(`null`),
  b: type(`1`),
  c: type(`text`),
  d: type(`{name: 'Jane'}`),
  f: type(`[1, 2, 3]`),
  g: type(`true`),
  h: type(current_time(`0`))
}
Result
{
  "a": "null",
  "b": "number",
  "c": "string",
  "d": "object",
  "f": "array",
  "g": "boolean",
  "h": "string"
}

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article