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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:24:36+00:00 2026-06-16T05:24:36+00:00

I’m currently using two JSON web-services to fill two separate NSMutableArrays asynchronously. Local Stock

  • 0

I’m currently using two JSON web-services to fill two separate NSMutableArrays asynchronously.

Local Stock & Supplier stock

The first web-service retrieves local stock, the other one retrieves supplier stock.
So after the two arrays get filled, I run a -(void)compareArrays function after dispatch_group_wait(group, DISPATCH_TIME_FOREVER);

Custom object

I use a custom object to store the data from the webservices. Each object represents one product.

Different keys per webservice (same (type of) value)

Since both webservices return differently named key-value pairs (since one returns its key in Dutch, the other in English) I’ve got two parsing functions for the object. Basically the [dictionary objectForKey:@"property"] is different when parsing the different Web-services, but the properties it’s setting are the same.

Update local stock information with supplier stock information

The supplier-webservice also returns products that are being returned by the local stock webservice. Certain properties on the local product have to be updated by the supplier-webservice, and I’m trying to make it work.

Now this works for a lot of products, but some products somehow don’t set off the if-loop. I’ve checked the JSON-result as well as putting both the local and the supplier version of the product in NSLog: their hashes and externalItemId’s were the same.

This object somehow doesn’t get through the if loop, even though just after creation, the externalItemId is being set to the value of the “artikelsysteemnummer”, which is the supplier-webservice’s key for the externalItemId. Their hashes are identical as well.

Does anybody have an idea where it might go wrong? Because I see this product being skipped by the MergeArrays-function, and the grossPrice remains 0 instead of 13100.

Thanks in advance!

Update

I checked my code again, and in the WebService-code there was this little debug code stuck in there that said if the supplier-stock was 0, don’t add the product to the array. Though I forgot to remove it (as some supplier stock might return 0, but we would have it in local stock, hence the product didn’t update).

Thanks everybody and have happy holidays!

  • 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-16T05:24:38+00:00Added an answer on June 16, 2026 at 5:24 am

    Sorry guys! I just checked my code, and there was this stupid debug if-loop I forgot to remove in the webservice-code that prevented several products from being added to the array. Thanks for the help though!

    (I’ve updated the main post to reflect this)

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am using jsonparser to parse data and images obtained from json response. When
I want use html5's new tag to play a wav file (currently only supported
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... 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.