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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:41:57+00:00 2026-06-02T19:41:57+00:00

Im Extracting Data from NSMuableDictionary to NSString and try compering to String like this:

  • 0

Im Extracting Data from NSMuableDictionary to NSString and try compering to String like this:

   NSDictionary *error = [[NSDictionary alloc]init];
   NSString *errorCode = [[NSString alloc]init];
   error = [sing.globalCallsDitionary valueForKey:@"Error"];
   NSLog(@"error code %@",[error valueForKey:@"error_code"]);
   errorCode = [error valueForKey:@"error_code"];
   if ([errorCode isEqualToString:@"-1"]) {

When the if statement executed i get this error talking about an array, the error looks like this:

2012-04-27 06:34:49.686 CallBiz[10319:707] error code (
    "-1"
)
2012-04-27 06:35:00.602 CallBiz[10319:707] -[__NSArrayI isEqualToString:]: unrecognized selector sent to instance 0x16fc10
2012-04-27 06:35:00.608 CallBiz[10319:707] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSArrayI isEqualToString:]: unrecognized selector sent to instance 0x16fc10'
*** First throw call stack:
(0x3541f88f 0x36846259 0x35422a9b 0x35421915 0x3537c650 0xb2a3 0x353793fd 0x32458faf 0x32458f6b 0x32458f49 0x32458cb9 0x324595f1 0x32457ad3 0x324574c1 0x3243d83d 0x3243d0e3 0x3667222b 0x353f3523 0x353f34c5 0x353f2313 0x353754a5 0x3537536d 0x36671439 0x3246be7d 0x2e61 0x28fc)
terminate called throwing an exception

It is as xCode is looking on my NSString *errorCode = [[NSString alloc]init]; as if it is an NSArray, can someone help me with this?

  • 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-02T19:42:00+00:00Added an answer on June 2, 2026 at 7:42 pm

    Error occurs because your errorCode came as a array, instead of string. If you are sure that only 1 object come here, then you can use –

    if ([[errorCode objectAtIndex:0] isEqualToString:@"-1"])
    

    It will work, although it will through a warning, because errorCode is defined as a string object. So you ned to sure what data you are getting in response and then define data structure appropriately.

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

Sidebar

Related Questions

When extracting data from a list this way line[0:3], line[3][:2], line[3][2:] I receive an
I'm extracting data from various sources into one table. In this new table, there's
I am extracting data from excel that is in this format product1 | unnamedcol2
given this xml file, i would like to extract the data out from it.
I'm extracting data from a webserivce. This is my select statement to retrieve the
I am tasked with extracting data from 2 tables: Master and Charges. The common
I am working on a project that requires reading text files, extracting data from
So I'm extracting the lines that I want from this larger file using this
Extracting data from XML I want to preprocess one before sending it as a
I have difficulty in extracting data from datagrid. Since I was using selectionchange event

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.