# Product Details

Displaying product details is fairly similar to searching for all products, all you need to do is pass in the `product_id` as a filter option to the search and then display the data that you wish to display:

```javascript
const productsIndex = searchClient.initIndex('menu-products-demo');

productsIndex.search('', 
       { 
         filters: 'store_id: 5 AND product_id: 1902',
         hitsPerPage: 1,
       }).then((results) => {
         console.log(JSON.stringify(results, null, 2));
});
```

Since this is the same index being queried as the regular search, as shown in this example [here](https://replit.com/@DanaLevine1/Query-For-Flowers#index.js), the results object is the same, the only difference is the list of results should only contain a single item.

#### **Reviews**

Reviews are a crucial piece of the shopping experience and to query them is very similar to fetching a product. We simply need to hit the reviews index and pass in the `product_id` we want reviews for.

```javascript
const productsIndex = searchClient.initIndex('product-reviews-demo');

productsIndex.search('', 
       { 
         filters: 'product_id: 1902',
       }).then((results) => {
         console.log(JSON.stringify(results, null, 2));
});
```


---

# 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.iheartjane.com/jane-docs/implementing-roots/building-your-menu/using-other-technologies/product-details.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.
