# Accessing the Results array, not individual results

**URL:** <https://discuss.elastic.co/t/accessing-the-results-array-not-individual-results/283460>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [September 6, 2021, 3:20pm UTC](https://discuss.elastic.co/t/accessing-the-results-array-not-individual-results/283460 "2021-09-06T15:20:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![learning\_bear](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/learning_bear/32/94197_2.png) [@learning\_bear](https://discuss.elastic.co/u/learning_bear)\
**Post date:** [September 6, 2021, 3:20pm UTC](https://discuss.elastic.co/t/accessing-the-results-array-not-individual-results/283460/1 "2021-09-06T15:20:22Z")

</div>

Sorry for this noob question. Learning JS, React and Elastic all in one go is not that easy. Would appreciate some help here.

I have set up an index in a local Enterprise Search cluster and I can connect to it using a simple React project based on `Search UI library`. Basically I am able to list all the individual results matching to my query using the simple following basic `App()`.

```auto
function App() {
  return (
      <SearchProvider config={configurationOptions}>
        <div className="App">
          <Layout
              header={<SearchBox autocompleteSuggestions={true}/>}
              bodyContent={<Results titleField="BookTitle" />}
          />
        </div>
      </SearchProvider>
  );
}

```

Now my question:

The code above lists all the results one-by-one, basically maps each element of the array to a div element. THis is fine. But I would like to have render this array as such in the form of a table. Therefore I need to access the `Results` array and do my thing with it and return one element, not as many elements as the number of matching results.

A link to a working example would be super helpful.

---

<div class="post-metadata">

**Author:** ![maryna.cherniavska](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/maryna.cherniavska/32/89935_2.png) [@maryna.cherniavska](https://discuss.elastic.co/u/maryna.cherniavska)\
**Post date:** [September 6, 2021, 3:36pm UTC](https://discuss.elastic.co/t/accessing-the-results-array-not-individual-results/283460/2 "2021-09-06T15:36:45Z")

</div>

I understand that you're using the Search UI library, right? I think that the [second example](https://github.com/elastic/search-ui#creating-a-search-experience) from the Search UI Docs, the one that's called a `headless` option, is what you want. The example is also about the `<div>`, but it gives you access to the result array and the `<div>` can be replaced with whatever you need - `<td>`, `<li>` etc.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 4, 2021, 3:37pm UTC](https://discuss.elastic.co/t/accessing-the-results-array-not-individual-results/283460/3 "2021-10-04T15:37:32Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
