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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:36:03+00:00 2026-06-08T03:36:03+00:00

I have the following text in a .txt file :: <?xml version=1.0 encoding=UTF-8?> <!DOCTYPE

  • 0

I have the following text in a .txt file ::

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
    <dict>
            <key>aa</key>
            <string>2012-07-19 11:16:00</string>
    </dict>
    <dict>
            <key>bb</key>
            <string>2012-07-19 11:16:02</string>
    </dict>
    <dict>
            <key>cc</key>
            <string>2012-07-19 11:16:05</string>
    </dict>
    <dict>
            <key>dd</key>
            <string>2012-07-19 11:16:07</string>
    </dict>
    <dict>
            <key>aa</key>
            <string>2012-07-19 11:16:10</string>
    </dict>
    <dict>
            <key>bb</key>
            <string>2012-07-19 11:16:13</string>
    </dict>

I put these contents into an array by using the following line of code ::

self.kkkk = [NSMutableArray array];

NSString *Dir = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
NSString *filePath = [Dir stringByAppendingPathComponent:@"abcd.txt"];

NSArray *array = [NSArray arrayWithContentsOfFile:filePath ];
kkkk = [[NSMutableArray alloc] init];
for (NSDictionary *dict in array) {
    [kkkk addObjectsFromArray:[dict allKeys]];

}

while adding the contents I wish to put only the unique values for aa, bb, cc and dd. For this, I want to put their one single entry in the array kkkk alongwith their latest timestamp.

How can I do that ?? Especially the comparing of two timestamp .. can someone help me out ?? Thanks and Regards.

  • 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-08T03:36:06+00:00Added an answer on June 8, 2026 at 3:36 am

    First get all the object from dictionary and then check following

    for (NSDictionary *dict in array) 
    {
        if(![kkkk containsObject:objectFromDictionary])
        {
           [kkkk addObjectsFromArray:[dict allKeys]];
        }
    }
    

    this may work but you should add object one by one instead of adding all keys.

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

Sidebar

Related Questions

I have the first few lines of a text file fx.txt with the following
I have the following text in xml file: <Config Builder=LP Wizard> <Libraries> <Library Name=XCAMSource/>
I have the following text file (ExamMarks.txt) John, 85, 95, 90 Micheal, 60, 75,
I have this test.txt file with the following content: @echo off wget -q http://subs.ro/get/21518
I have the following context free grammar in a text file 'grammar.txt' S ::=
I have a .txt file that has the following details: ID^NAME^DESCRIPTION^IMAGES 123^test^Some text goes
I have a text.txt file which contains following txt. Kontagent Announces Partnership with Global
I have the following text in a string in the resources file: <a href=mailto:mymail@mail.com>&lt;img
I have the following text: We%27re%20proud%20to%20introduce%20the%20Amazing I'd like to remove the encoding using PHP,
I have following data in text file 375020222511963 284970411563422 290245594366931 I need to retrieve

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.