I have a very basic programing question that i hoped you can shed a light on.
I am working a lot of objects right now and i was wondering if it is better to search f
It's a kind of question with no wrong answers. Both cases are good enough. Depends on case. You should think about the semantics. Do you return array of elements (i.e. list of users, etc.) or just object with a lot of properties within? This structure should depend on data, I guess.
But keep in mind, that access by property object.property is faster than array[index].