# Sorting numbers in a list of objects (sharing)

**URL:** <https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662>\
**Category:** Questions about Thunkable X\
**Created:** [January 10, 2021, 1:34pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662 "2021-01-10T13:34:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![gobassky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/gobassky/32/77019_2.png) [@gobassky](https://community.thunkable.com/u/gobassky)\
**Post date:** [January 10, 2021, 1:34pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/1 "2021-01-10T13:34:43Z")

</div>

While working with airtable REST API directly to download table sorted in way I wanted. I have to handle offsets, and download multiple pages, if the table have more than 100 rows… a real nightmare but it was done. However the blocks were messy and not elegant, but it is still better than assembling sorting algorithm with blocks to sort the list of objects by specific keys.

Then I found out I could use a quick cheat to simply use the Thunkable Airtable blocks to simple get the whole table and sort myself, well again using the sorting blocks. Found out that alphabet sorting also works for numbers. So this is my sharing. I couldn’t believe this just replaced my whole page of blocks and would have safe days used for working with REST API.

 ![sort](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/f/9/f9bde014cb859e293e278aac5104cfb467365119.png)

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [January 10, 2021, 2:24pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/2 "2021-01-10T14:24:06Z")

</div>

there should be four join blocks in y in the top add y itself

---

<div class="post-metadata">

**Author:** ![gobassky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/gobassky/32/77019_2.png) [@gobassky](https://community.thunkable.com/u/gobassky)\
**Post date:** [January 10, 2021, 2:28pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/3 "2021-01-10T14:28:52Z")

</div>

No need. the top y is string joined by only the attribute to the key + spacer + thew entire json string of the object… Then I am building z, a list of such strings to utilise the sort list block. No need to add to itself.

Tested working well.

Note the divide by 1000, if the numbers expected to be sorted are larger than 4 digits, then you may divide with more zeros. intend was to make the pre-sort numbers all have the same order of magnitude. (because I am sorting ‘numbers’ with alphabet algo which reads/sort the first ‘digit’, and then ‘next’.)

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [January 10, 2021, 2:30pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/4 "2021-01-10T14:30:38Z")

</div>

then can you tell what error is coming

---

<div class="post-metadata">

**Author:** ![gobassky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/gobassky/32/77019_2.png) [@gobassky](https://community.thunkable.com/u/gobassky)\
**Post date:** [January 10, 2021, 2:34pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/5 "2021-01-10T14:34:57Z")

</div>

Working fine and well. No error. Sharing a shortcut method I found useful.

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [January 10, 2021, 2:38pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/6 "2021-01-10T14:38:18Z")

</div>

so why you have added this in the thunkable discuss

---

<div class="post-metadata">

**Author:** ![gobassky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/gobassky/32/77019_2.png) [@gobassky](https://community.thunkable.com/u/gobassky)\
**Post date:** [January 10, 2021, 2:44pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/7 "2021-01-10T14:44:28Z")

</div>

Thunkable discuss is for sharing, exchange of ideas, helping each other, no? Thought this is a place not simply for asking questions? I made it clear in the title and in the texts within the first post. Sorry I have wasted your time.

" This space is dedicated for discussing anything related to the Thunkable ✕ Cross Platform ([x.thunkable.com](http://x.thunkable.com/))"

---

<div class="post-metadata">

**Author:** ![luv.ak.tech](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/luv.ak.tech/32/104896_2.png) [@luv.ak.tech](https://community.thunkable.com/u/luv.ak.tech)\
**Post date:** [January 10, 2021, 2:55pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/8 "2021-01-10T14:55:05Z")

</div>

yes it is but it is more of a tutorial i think and mostly thunkable discuss is for questions so i think this should be in thunkable tutorial

---

<div class="post-metadata">

**Author:** ![gobassky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/gobassky/32/77019_2.png) [@gobassky](https://community.thunkable.com/u/gobassky)\
**Post date:** [January 10, 2021, 3:00pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/9 "2021-01-10T15:00:15Z")

</div>

I see. Thanks. @luv.ak.tech

If moderator is reading this, please help shift over. My bad.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:30pm UTC](https://community.thunkable.com/t/sorting-numbers-in-a-list-of-objects-sharing/1043662/10 "2024-11-08T13:30:54Z")

</div>


