Jacob Smith Jacob Smith - 1 year ago 245
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