# Sorting the property while fetching

**URL:** <https://forum.weaviate.io/t/sorting-the-property-while-fetching/21559>\
**Category:** Support\
**Tags:** technical\
**Created:** [June 30, 2025, 2:17am UTC](https://forum.weaviate.io/t/sorting-the-property-while-fetching/21559 "2025-06-30T02:17:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![100\_Jayanth\_Vunnam](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/100_jayanth_vunnam/32/5797_2.png) [@100\_Jayanth\_Vunnam](https://forum.weaviate.io/u/100_Jayanth_Vunnam)\
**Post date:** [June 30, 2025, 2:17am UTC](https://forum.weaviate.io/t/sorting-the-property-while-fetching/21559/1 "2025-06-30T02:17:19Z")

</div>

Details here

I was saving data in weaviate cloud and one of the property is created\_at of date type.

I want to fetch recent created\_at files sorted in desc of limit 10.

I am uing weaviate 3.6.2 in Nodejs TS/JS

```
        const result = await myCollection.query.fetchObjects({
            // Use Sort.byProperty() to create the sorting object
            sort: {
                byProperty: 'name', // The property you want to sort by
                order: 'Asc' // The order: 'Asc' or 'Desc'
              }
          });

```

I am not able to figure it out and getting errors.

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [June 30, 2025, 5:36am UTC](https://forum.weaviate.io/t/sorting-the-property-while-fetching/21559/2 "2025-06-30T05:36:02Z")

</div>

Hello @100_Jayanth_Vunnam,

Welcome to the community — it’s great to have you with us!

You can sort by metadata properties - see the example below:

> **[Additional operators | Weaviate](https://weaviate.io/developers/weaviate/api/graphql/additional-operators#metadata-properties)**
>
> Syntax

If you’re using Weaviate Cloud and we’re hosting your Weaviate instance, feel free to reach out to us anytime at **[support@weaviate.io](mailto:support@weaviate.io)** (our ticketing system for our cloud users).

Best regards,

Mohamed Shahin  
Weaviate Support Engineer  
(Ireland, UTC±00:00/+01:00)
