# Sample Data

The sample data for most WireBootstrap theme projects is in a JSONs file located at `\data\sampleData.json`.

![Project Data Directory](/files/4M5FLb6fjJ1NTmh19sMN)

Below is one of the records in the sample data file.

```javascript
 {
        "Product": "All-Purpose Bike Stand",
        "Promotion": "No Discount",
        "OrderYear": "2019",
        "OrderMonth": "2019-02",
        "Cost": 951.4560,
        "Sales": 2544.0000
 }
```

A [local data source](https://docs.wirebootstrap.com/data-connectors/local-data) is created from the sample data file located in the same directory at  `sampleData.ts`.

```javascript
const sampleDataSource = new wire.data.DataSource("local", {
    Provider: { 
        Json: {url: "../../data/sampleData.json" } 
    },
  ...
});  
```

## Data Model

Adding a [data model](https://docs.wirebootstrap.com/wirebootstrap/connecting-to-data/data-sources#data-models) tells WireBootstrap about the sample data so its able to automatically add data attributes such asSample Data formatting and display labels to result sets on behalf of components.

```javascript
const sampleDataSource = new wire.data.DataSource("local", {
    ...
    Model: new wire.data.DataModel({
        Fields: [
            { Entity: "SampleData", Name: "Sales", Format: "C0" },
            { Entity: "SampleData", Name: "Cost", Format: "C0" }
        ]
    })
});  
```


---

# 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-themes/sample-data.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.
