You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is a situation where data is viewed from a database and the data is visible in calendar.
Here's the data you inquired about.
[ { "id": 1, "name": "project1", "status": 0, "start": "2023-02-28", "end": "2023-03-13" }, { "id": 2, "name": "project2", "status": 0, "start": "2023-02-25", "end": "2023-03-11" }, { "id": 3, "name": "project3", "status": 0, "start": "2023-02-28", "end": "2023-05-20" } ]
const events = []; list.forEach((data)=>{ events.push({ id: data.id, title: data.name, start: data.start, end: data.end }); }); calendar.createEvents(events);
The results I want are in the order of project1, project2, and project3.
How do I sort the order by id?
Beta Was this translation helpful? Give feedback.
All reactions