Jacob Smith Jacob Smith - 2 years ago 346
Swift Question

How to remove an item from JSON array in Swift (using SwiftyJSON)

Pretty simple and straightforward question.

I have a jsonArray, and i want to delete an item by index. How do I do that?

I tried using the solution from here:

Like this:


But I got this error:

value of type json has no member dictionaryObject

Answer Source

you just use


Hear you just pass the index that you want to remove items

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download