Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8938271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:35:14+00:00 2026-06-15T10:35:14+00:00

I have an array of instances of my object – MyObject . Each instance

  • 0

I have an array of instances of my object – MyObject. Each instance has a string and an array property – myArrayProperty which contains instances of another class – MyOtherObject I am using an NSPredicate to do some filtering based on the values in myArrayProperty as so:

  NSPredicate *myPredicate = [NSPredicate predicateWithFormat:@"myArrayProperty.otherObjectProperty MATCHES %@", mySearchString];

In this case otherObject property is a string property of MyOtherObject. I suspect the problem is with this construct: myArrayProperty.otherObjectPropert

My question is, how do I instruct the predicate to go through all items in myArrayProperty? I would like to avoid using a for loop here. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:35:15+00:00Added an answer on June 15, 2026 at 10:35 am

    You can use…

    NSPredicate *myPredicate = [NSPredicate predicateWithFormat:@"ANY myArrayProperty.otherObjectProperty MATCHES %@", mySearchString];
    

    I believe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array of a custom JavaScript object which has a property named
How could I accomplish copying one jagged array to another? For instance, I have
I have an object array, I know that the elements are type String, say
I have an array with close to 1000 instances of a class, each of
I have an object student which has variables like student->name , student->age , student->marks
Okay, so I have this code which just iterates through my object array blitting
I've created a Canvas class which has an Array of multiple instances of CanvasEntity
class A attr_accessor :dab .... end Now I have an array of instances of
I have an array for instance, Array { 3.0 at Index 0 2.0 at
I have an NSMutableArray. It's members eventually become members of an array instance in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.