Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js sort array of objects

 {datacategorie?.sort((a,b)=> a.titreScategorie?.toLowerCase() > b.titreScategorie?.toLowerCase() ? 1 : -1)?.map((item) => (
                  <option key={item.id} value={item.id}>
                    {item.titreScategorie}
                  </option>
                ))}
Source by www.enjoysharepoint.com #
 
PREVIOUS NEXT
Tagged: #js #sort #array #objects
ADD COMMENT
Topic
Name
8+9 =