I have an array of arrays with objects and now want to get all objects for a certain date (which is an object property).
what’s the best way to query it?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In this case you have to make a double for-loop with fast enumeration and look into each object.
Maybe it would be better if you exchange the first array with a dictionary which keys are dates. For each key in the dictionary you store an array with objects whose date is the same as in the dictionary key. With that you won’t have to look at each single object.