> For the complete documentation index, see [llms.txt](https://pleex.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pleex.gitbook.io/docs/getall.md).

# getAll

Get all data's inserted to your collection's

### `getAll((data)=> {}, (error)=> {})`

## How to use:

```jsx
my_collection.getAll(
    (data) =>  // data can access here,
    (error) => alert(error) 
);
```

## Arguments:

| parameter        | required | types    |
| ---------------- | -------- | -------- |
| success callback | yes      | function |
| failure callback | yes      | function |

## Example:

```jsx
import React,{useEffect} from 'react';
import {Text} from 'react-native';
import {Pleex} from 'pleex';

const App = () => {
  
  // Create collection
  const my_collection = Pleex.collection('myCollection');
  
  // Get all data saved
  my_collection.getAll(
    (data) => console.table(data),
    (error) => console.log(error)
  );
  
  return (
    <>
      <Text>Try getAll api</Text>
    </>
  );

};

export default App;
```
