in my javascript, i have an Array of Calendar objects.
Each Calendar objects has an array of CalendarEvent objects
Each CalendarEvent object has a property Date, Name.
i want to check, give a date, it its exists in a specific Calendar.
I wanted to see if i could use jquery.InArray() but it seems like i have to loop through every CalendarEvent object in the Calendar to find it.
is there any faster way to do this search ??
You can build an index (e.g. a reverse lookup).
For example, your Calendar object could have an object of Date => CalendarEvent mappings. The key (the Date) must be serialized to a string (to be inserted into the object), so you may want to use the UNIX time as the key.