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 6689151
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:29:09+00:00 2026-05-26T05:29:09+00:00

I don’t get how from an array of Strings (parentRootItems), I do get objects

  • 0

I don’t get how from an array of Strings (parentRootItems), I do get objects with this code:

NSArray *parentRootItems = [pFolder rootItems];
NSLog(@"parentRootItems %@", [parentRootItems description]);

NSString *keyPath = [NSString stringWithFormat:@"@distinctUnionOfObjects.%@", metadata.lookupItemsKeyPath];
NSLog(@"keyPath %@", keyPath);

NSArray *managedItems = [parentRootItems valueForKeyPath:keyPath];
NSLog(@"managedItems %@", [managedItems description]);

Thanks

Output

parentRootItems (Self-Inflicted Wounds / Rebirth)
                (Self-Inflicted Wounds / Rebirth)
                ...


keyPath @distinctUnionOfObjects.Series

 managedItems (
    <CBSeries: 0x1ddf3c0> (entity: Series; id: 0x1ddf260 <x-coredata://2B6F6719-9BCB-4C5C-B027-0DE2C7C1910C/Series/p350> ; data: {
    ClzID = 37268;
    Comics = "<relationship fault: 0x1de3790 'Comics'>";
    Complete = 0;
    DisplayName = Annihilators;
    Frequency = nil;
    ISSN = nil;
    Image = nil;
    Name = nil;
    NumIssues = 0;
    SortName = Annihilators;
    Stories = "<relationship fault: 0x1de39c0 'Stories'>";
    The = nil;
    URL = nil;
    UniqueID = 1;
}),
    <CBSeries: 0x1dd2940> (entity: Series; id: 0x1db4b60 <x-coredata://2B6F6719-9BCB-4C5C-B027-0DE2C7C1910C/Series/p354> ; data: {
    ClzID = 3856;
    Comics = "<relationship fault: 0x1de4230 'Comics'>";
    Complete = 0;
    DisplayName = Futurama;
    Frequency = nil;
    ISSN = nil;
    Image = nil;
    Name = nil;
    NumIssues = 0;
    SortName = Futurama;
    Stories = "<relationship fault: 0x1de4510 'Stories'>";
    The = nil;
    URL = nil;
    UniqueID = 9;
}),
...
  • 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-05-26T05:29:10+00:00Added an answer on May 26, 2026 at 5:29 am

    parentRootItems isn’t an array of strings. By the looks of this it is an array of managed objects, which each have a .Series attribute, which points to another managed object, of Series entity.

    You are getting back an array containing each Series entity used by the objects in parentRootItems, with any duplicates removed.

    To see more clearly what is in parentRootItems, use the following log message instead of the description which is what you are currently doing:

    NSLog(@"Parent root items: %@",parentRootItems);  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't understand where the extra bits are coming from in this article about
Don't let below code scare you away . The question is really simple, only
Don't be scared of the extensive code. The problem is general. I just provided
Don't dismiss this as a newbie question! It's not, I'm not, I've tried everything,
For some reason, after submitting a string like this Jack’s Spindle from a text
Don't need to do this right now but thinking about the future... What would
Don't want to sort the entries. using this does not preserve the order as
Don't be frightened, its a very basic code. Just wanted to check with you
I don't know Regex very well, and I'm trying to get all of the
I don't know if this is possible. I display a table of results and

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.