-
Hosting
Describe the bug |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Beta Was this translation helpful? Give feedback.
-
hey @esellier, it sorts alphabetically on the first key of the object in the array. You could add a property like here's a json object I had where it was being sorted by year because it was the first key of the first object: if I want it to sort based on the raw order of the object itself, I can add some js like so: const your_array = [] // your json array
return your_array.map((object, i) => ({ index: i + 1, ...object })); ![]() hope this helps - if you have any questions on this let me know |
Beta Was this translation helpful? Give feedback.
hey @esellier,
it sorts alphabetically on the first key of the object in the array. You could add a property like
index
to the start of each object with ascending numbers to force the objects to remain sorted how you want them to be.here's a json object I had where it was being sorted by year because it was the first key of the first object:
if I want it to sort based on the raw order of the object itself, I can add some js like so:
hope this helps - if you have any questions on this let me know