isTypeList
Tests if the data type of the input value is a list and returns a Boolean true or false.
To make a list from zero or more input values, use makeList. To convert a non-list value (e.g. a column or a JSON array) to a list, use asList instead.
Parameters
VALUE (any)
The value to test.
Examples
Testing lists with isTypeList
Here's how you might use isTypeList to check if a value or variable is a list.
ATL in Script | Result | Notes |
|---|---|---|
| true | The test value is a list. |
| false | The test value is null. |
| true | The test value is a list. |
| true | The test value is an empty list. |
Testing JSON data with isTypeList
Assume a "Describe a JSON Object" project with this data:
{
"data": {
"mnth": "January",
"year": "2023",
"state": "California",
"branches": [
"null",
"San Francisco",
""
],
"sales": 245678.89,
"target": 250000,
"manager": {
"name": "Robyn Banks",
"age": 51,
"married": false
}
}
}Here's how you might use isTypeList to check values in the data:
ATL in Text | Result | Notes |
|---|---|---|
| false | The test value is a string. |
| false | The test value is a JSON array. |
| true | The JSON array has first been converted to a list using the |
| true | The test value is a list. |
| false | The test value is a Boolean. |