# Array.to_string ## Function Serialize an array into a JSON string. ## Syntax ```bt array.to_string(mode) ``` ## Parameters | Parameters | Type | Required | Default value | Description | | ------ | ------ | ------ | ------ | ------ | | mode | String | No | None | Returns the indentation format when passing in JSON_PRETTY. | ## Return value | Type | Description | | ------ | ------ | | String | Returns an array of JSON strings. | ## Example ```bt items = [1, 'BT'] result = items.to_string() // Output: [1,"BT"] print result ``` ## Notes - Normal mode outputs compact JSON. - JSON_PRETTY is a system constant whose value is the string JSON_PRETTY.