0

Using Restkit in my iOS project and the api is getting back a generic array of strings. How do I get access to those array of strings?

This is what is returned by the api.

{
"servers": ["http://myserver.com", "http://myotherserver.com"]
}
1
  • How do you want to store the objects? Core Data? Transformable? Entities with a serverURLString attribute? Give a clue... Commented Jun 28, 2013 at 14:57

1 Answer 1

1

Assuming the response is an NSDictionary:

strings = [{response_object} objectForKey: @"servers"]

Will return an NSArray of the strings held in the servers key.

Replace {response_object} with whatever your response is. I may not be understanding your question though, it's quite vague.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.