I have a JSON array var array: [JSON] = [] that I would like to cast as a 'regular' array so that I can perform some filtering and other data manipulation. What would be the suggested approach to do so?
I've tried let filteredArray = array.arrayValue.filter {$0["submission_id"] as! Int == 27} but I was thrown this error
Value of type '[JSON]' has no member 'arrayValue'
[JSON]then that is already a "regular array".array.filtershould work.$0["submission_id"].doubleshould give you a double, that's close ...