---
title: OBJECTS_TO_MARKDOWN_TABLE
url: https://www.tines.com/docs/formulas/functions/objects-to-markdown-table/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# OBJECTS_TO_MARKDOWN_TABLE

*[View on tines.com](https://www.tines.com/docs/formulas/functions/objects-to-markdown-table/)*

Converts an array of objects into a markdown-formatted table string. Headers are optional; if none are provided, the keys of the first object are used. Pipe characters in values are escaped automatically.

**Categories:** Data Parsing/Conversion

## Syntax

```
OBJECTS_TO_MARKDOWN_TABLE(objects, headers)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "objects": [
      {
        "name": "John Smith",
        "age": 45,
        "city": "Melbourne"
      },
      {
        "name": "Jane Doe",
        "age": 32,
        "city": "Sydney"
      },
      {
        "name": "Bob Jones",
        "age": 27,
        "city": "Brisbane"
      }
    ]
  }
}
```

Formula:

```
OBJECTS_TO_MARKDOWN_TABLE(my_action.objects)
```

Output:

```json
"| name | age | city |\n| --- | --- | --- |\n| John Smith | 45 | Melbourne |\n| Jane Doe | 32 | Sydney |\n| Bob Jones | 27 | Brisbane |"
```

### Example 2

Input:

```json
{
  "my_action": {
    "objects": [
      {
        "name": "John Smith",
        "age": 45,
        "city": "Melbourne"
      },
      {
        "name": "Jane Doe",
        "age": 32,
        "city": "Sydney"
      },
      {
        "name": "Bob Jones",
        "age": 27,
        "city": "Brisbane"
      }
    ]
  }
}
```

Formula:

```
OBJECTS_TO_MARKDOWN_TABLE(my_action.objects, ["name", "city"])
```

Output:

```json
"| name | city |\n| --- | --- |\n| John Smith | Melbourne |\n| Jane Doe | Sydney |\n| Bob Jones | Brisbane |"
```
