I am working on an android project in java. I have an array of objects that looks like this
Agenda = [{id: 1, sessionName: Some name, sessionLocation: Some place},
{id: 2, sessionName: Some name, sessionLocation: Some place},
{id: 3, sessionName: Some name, sessionLocation: Some place}]
I also have an array of strings that is dynamic, so it can have several values... looks like this:
sessionID = {1, 3}
How can I check for these sessionIDs within the "id" field in the Agenda array and pull only these objects where the ids match into a new array.
Note:
- This is java not javascript
- "id" in the Agenda array objects is an int
- sessionID array is an array of string
I tried several examples but none of them worked!