Vor Kurzem aufgerufene Suchen


Keine vor kurzem aufgerufene Suchen

how to sort organizations alphabetically while retrieving organizations using search API.



Gepostet 07. Feb. 2022

i am using following code to retrieve organizations.


client.request('/api/v2/search.json?'+encodeURI('query=type:organization name:'+searchString+'*')).then(updateUI);

 

i want to sort results according to alphabetical order of organizations names. i have tried sort_by parameter but didn't worked.


0

1

1 Kommentar

image avatar

Sebastiaan (Sparkly ⭐)

Community Moderator

Hey suyogAgent,

You probably want to sort it on your end.

Something like:

organizations.sort((a, b) => a.name.localeCompare(b.name));

 

0


Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Sie finden nicht, wonach Sie suchen?

Neuer Post