# Convert Thing to Table

### Overview

Converts a specified thing, such as a CSV file or JSON, into a table. Only CSV files (and JSON if new\_json is enabled) are supported for conversion.

### Syntax

```
convert the csv to a table
```

or

```
convert <the thing> to a table
```

Where *the thing* is replaced by a reference to a CSV or JSON object.

### Parameters

* **thing** (required): The object to be converted into a table. Must be a CSV file or JSON object.

### Returns

A table created from the CSV or JSON data.

### Examples

#### Example 1: Convert CSV File to Table

```
the csv
convert the csv to a table
```

**Result**: Table created from CSV file contents

Expected table structure:

| Name       | Age | Salary   | City        |
| ---------- | --- | -------- | ----------- |
| John Doe   | 30  | 50000.5  | New York    |
| Jane Smith | 25  | 45000.75 | Los Angeles |
| ...        | ... | ...      | ...         |

#### Example 2: Convert CSV String to Table

```
create a sample table
convert the table to a csv
convert the csv to a table
```

**Result**: Round-trip conversion - table → CSV → table preserves data

#### Example 3: Convert JSON to Table (with new\_json enabled)

```
the foos is [{"name": "Obj 0", "val": "val 0"}, {"name": "Obj 1", "val": "val 1"}]
the foos is a json
convert the foos to a table
```

**Result**: Table with columns "name" and "val"

| name  | val   |
| ----- | ----- |
| Obj 0 | val 0 |
| Obj 1 | val 1 |

#### Example 4: Convert Single JSON Object to Table

```
the person is {"name": "Alice", "age": 30, "city": "NYC"}
the person is a json
convert the person to a table
```

**Result**: Single-row table

| name  | age | city |
| ----- | --- | ---- |
| Alice | 30  | NYC  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kognitos.com/legacy/legacy-experience/automation-areas/tables-v2/convert-a-table-to-csv/convert-thing-to-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
