isTypeString
Tests if the data type of the input value is a string and returns a Boolean true or false.
To convert a non-string value to a string, use the asString function.
Parameters
VALUE (any)
The value to test.
Examples
Assume a "Describe a JSON Object" project with this data:
{
"data": {
"mnth": "January",
"year": "2023",
"state": "California",
"branches": [
null,
"San Francisco",
""
],
"totalSales": 245687.89,
"sales": [
80678.50,
91000.39,
74000.00
],
"target": 250000,
"manager": {
"name": "Robyn Banks",
"age": 51,
"married": false
}
}
}Here's how you might use isTypeString to check values in the data:
ATL in Text | Result | Notes |
|---|---|---|
| true | The test value is a string. |
| true | The test value is a string. |
| false | The test value is a JSON array. |
| false | The test value is a null. |
| true | The test value is a string. |
| true | The test value is an empty string - although it has no characters, it is still a string. |
| false | The test value is a number. |
| false | The test value is a Boolean. |