# Introduction

A WireBootstrap [DataTable](/wirebootstrap/reference/wire.data/wire.data.datatable.md) is a JavaScript class that contains an array of objects much like records in a database table.  The data table contains dozens of methods for working with the array of objects including filers, transformations, and calculations.  This class is located at `wire.data.DataTable`.

The example below creates a new `DataTable` from an array of objects.  The raw array is put into a public property called `Rows`.  Also, a `Columns` array is created that contains information about each [column](/wirebootstrap/reference/wire.data/wire.data.datatable/columns.md) in the data table.

```javascript
let users = [
    { Users: "jkratz", FullName: "Jamie Kratz" },
    { Users: "pdougherty", FullName: "Pat Dougherty" }
];

let table = new wire.data.DataTable(rows);

const rows = table.Rows;

const columns = table.Columns;
```

{% hint style="info" %}
Note, it's a good idea to use `let` or `var` scope when declaring arrays of rows to be used with a data table.  The array sits inside a data table as a reference and not a copy so using operations on the data table that are designed to change the data or the array will error if the array is declared using a `const`.  However, if the table is being created for read-only purposes, it's safe to use a `const`.
{% endhint %}


---

# 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.wirebootstrap.com/wirebootstrap/working-with-datatables/datatables.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.
