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

  • SEARCH
  • Home
  • 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 7459091

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T14:02:36+00:00 2026-05-29T14:02:36+00:00

I have a predicate and i need to filter out an attribute. The name

  • 0

I have a predicate and i need to filter out an attribute. The name of the attribute is location, and this attribute could have none, one of more values. So how could i write the predicate

for example if the hospital location could have 0 or more values. It could have no location, or 1 (New York) or more (New York, California, Texas ). So based on the values on the array how could i write the predicate.

NSArray *filteredHospitalArr= [hospitalArray filteredArrayUsingPredicate:[NSPredicate predicateWithFormat:@"location= %@ ", [hospitalObject objectAtIndexPath:0]]]; // ???

<– Say at this instance we have 3 locations for this Hospital Location. How can i write this predicate.

Also note, that the number of location might change, (it might have none, one or more values)

EDIT:

Say if the user is asked to choose his/her filter criteria for a particular hospital. He/she would select one or more locations. So how do i write the predicate to suit his/her filter requirement. (The user might or might not enter a filter criteria, or enter more than one preferred location). So how could i write it based on this scenario

  • 0 0 Answers
  • 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

Sidebar

Related Questions

I have a predicate and i need to filter out an attribute. The name
I have predicate P1 that returns values one after the other like this: -?
I have now nearly figured out how to Filter a NSTreeController, to do this
I have a this line of code: var predicate = Expression.Lambda<Func<TEntityType, bool>>(body, param); where
I have a Ruby array containing some string values. I need to: Find all
I have the need to create a complex predicate for an abstract base object.
I think I know the answer to this but I have the need to
I have a WCF service written against some DB, and I need to filter
I have the need to skip the first element that matches a predicate as
I have UIPicker that I need to write search mechanism for. The data that

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.