# Storing in Array

* You could store the info in a Global variable in Memory to test out the functionality

```python
my_posts = [

    {
    "title": "title of post 1",
    "content": "content of post 1",
    "id": 1
    },

    {
    "title": "favorite foods",
    "content": "Pizza",
    "id": 2
    }
]
```

* This creates 2 posts with IDs so we can test out our HTTP Requests
* We have the following python function to retrieve the data

```python
@app.get("/posts")
def get_posts():
    return {"data": my_posts}
```

* If we use a `GET` request via Postman to get the data

![](https://3885248957-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoE4wMO1dMVDOGDjh0En7%2Fuploads%2FQcqTdJqscnAoTYLbgTmu%2Fimage.png?alt=media\&token=920b5f93-c14c-4727-9c68-d4d36dd46d74)

* We will get the following data

```json
{
    "data": [
        {
            "title": "title of post 1",
            "content": "content of post 1",
            "id": 1
        },
        {
            "title": "favorite foods",
            "content": "Pizza",
            "id": 2
        }
    ]
}
```

* We get the data properties followed by the posts that we have in the List/Array&#x20;
