# Displaying nested properties that can be sorted and filtered

**URL:** <https://community.forestadmin.com/t/displaying-nested-properties-that-can-be-sorted-and-filtered/360>\
**Category:** Help me!\
**Created:** [May 29, 2020, 3:18pm UTC](https://community.forestadmin.com/t/displaying-nested-properties-that-can-be-sorted-and-filtered/360 "2020-05-29T15:18:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dmytro](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/dmytro/32/270_2.png) [@Dmytro](https://community.forestadmin.com/u/Dmytro)\
**Post date:** [May 29, 2020, 3:18pm UTC](https://community.forestadmin.com/t/displaying-nested-properties-that-can-be-sorted-and-filtered/360/1 "2020-05-29T15:18:13Z")

</div>

Hi everyone,  
I wasn’t able to find anything related to my question in the docs, so I was wondering if anyone could give me a hint.

I have some nested properties in my mongoose schema, e.g.

```javascript
  'field': {
    'nestedField': {
      'date': Number,
      'age': Number,
      'status': String,
    },
  },

```

and I want to display them as a flat structure in collections table as a separate fields. I’d also like to preserve the ability to sort and filter the fields, so if I accomplish this using smart fields, I won’t be able to do that. Any advice will be highly appreciated.

---

<div class="post-metadata">

**Author:** ![anon37102731](https://avatars.discourse-cdn.com/v4/letter/a/c6cbf5/32.png) [@anon37102731](https://community.forestadmin.com/u/anon37102731)\
**Post date:** [May 29, 2020, 4:05pm UTC](https://community.forestadmin.com/t/displaying-nested-properties-that-can-be-sorted-and-filtered/360/2 "2020-05-29T16:05:27Z")

</div>

Hi @Dmytro,

Welcome to the Forest Admin Community !

I’m not sure to understand your need but maybe you could take a look at ForestAdmin [smart collections](https://docs.forestadmin.com/documentation/reference-guide/collections/amazon-s3-integration-example).

This way you could build your own collection with a flatten nested field and define by yourself the search and filter.

I hope this help

---

<div class="post-metadata">

**Author:** ![Dmytro](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/dmytro/32/270_2.png) [@Dmytro](https://community.forestadmin.com/u/Dmytro)\
**Post date:** [June 2, 2020, 9:12am UTC](https://community.forestadmin.com/t/displaying-nested-properties-that-can-be-sorted-and-filtered/360/3 "2020-06-02T09:12:59Z")

</div>

Hello, Valentin. Thank you for your advice. I implemented this using smart fields!

---

<div class="post-metadata">

**Author:** ![Dmytro](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/dmytro/32/270_2.png) [@Dmytro](https://community.forestadmin.com/u/Dmytro)\
**Post date:** [June 2, 2020, 9:31am UTC](https://community.forestadmin.com/t/displaying-nested-properties-that-can-be-sorted-and-filtered/360/4 "2020-06-02T09:31:37Z")

</div>

@anon37102731, may I also ask you about this topic:

> **[Default routes](https://docs.forestadmin.com/documentation/reference-guide/routes/default-routes#relationship-routes)**
>
> ⚠️ This page is relevant only if you installed Forest Admin directly on a database (SQL/Mongodb). If you installed in a Rails app, the default routes are managed within your Rails app.

> **GET** /forest/{modelName}/{id}/relationships/{hasManyRelationName}.csv ⟶ **Download** and export of an has many relationships

I have route **GET** ‘/games/:recordId/relationships/users’ (which works fine) but when I add **GET** ‘/games/:recordId/relationships/users.csv’ it doesn’t seem to work. Adding a smart action for this doesn’t work either. Do you have any examples how this can be implemented?

Thank you so much for your assistance.

---

<div class="post-metadata">

**Author:** ![anon36130554](https://avatars.discourse-cdn.com/v4/letter/a/b3f665/32.png) [@anon36130554](https://community.forestadmin.com/u/anon36130554)\
**Post date:** [June 5, 2020, 11:53am UTC](https://community.forestadmin.com/t/displaying-nested-properties-that-can-be-sorted-and-filtered/360/5 "2020-06-05T11:53:18Z")

</div>

Hello @Dmytro 👋

What do you mean by `it doesn't seem to work` ?

This call is performed when you try to export the data from a `related data` section of a record.

Here is an example:

 ![Screenshot 2020-06-05 at 13.51.14](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/1X/75cbdd664e40a8534f371163805b2633dda311d9.png)

Here it will target the said url, because I’m trying to exports the `activity logs` (the relationShip) from a user.

Steve.
