Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Technology & Software 2 years ago
Posted on 30 Aug 2022, this text provides information on Technology & Software related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I am getting a web service repsonse that is an array of dictionary. Each dictionary has objects whose values itself is another dictionary.I need to implement the search within this response,like if i enter "technology" and go for search, I should get those dictionary from the array that has "technology anywhere within that dictionary", Is there a solution to sort out
{ key1 = { 0 = { "id" = 608; "b" = "Apple-Iphone"; }; 1 = { "id" = 609; "b" = "Iphone"; }; 2 = { "id" = 610; "b" = "Show Text"; }; }; key2 = "Technology resources"; "key3" = { 0 = { "id" = 1608; "b" = "I love reading"; }; 1 = { "id" = 1609; "b" = "I prefer iphone to others"; }; 2 = { "id" = 1610; "b" = "Mobile technology is great.I am happy to a be developer"; }; }; "key4" = "Mobile technology is the fun"; }
This is First Method
NSMutableDictionary *dict; NSArray *allKeys = [dict allKeys]; for (NSString *key in allKeys) { NSDictionary *innerDict = [dict objectForKey:key]; NSArray *allInnerKeys = [innerDict allKeys]; for (NSString *innerKey in allInnerKeys) { NSDictionary *mostInnerDict = [dict objectForKey:innerKey]; NSString *b = [mostInnerDict objectForKey:b]; NSString *search = @"Technology"; NSString *sub = [b substringFromIndex:NSMaxRange([b rangeOfString:search])]; if(sub) { // ADD mostInnerDict Object to your Results Array } } }
Or You can Try The Simpler Method
Get Response in NSDATA
Covert NSDATA To NSString
and search in NSSTRING for Substring
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.