    
}
extension PeopleViewController: UISearchBarDelegate {
    func searchBar(_ searchBar: UISearchBar, textDidChange searchText: String) {
        if let path = Bundle.main.path(forResource:"userinfo", ofType: "json") {
            let myUrl = URL.init(fileURLWithPath: path)
            if let data = try? Data.init(contentsOf: myUrl) {
                do {
                    userInfo = try JSONDecoder().decode(Results.self, from: data).results
                    userInfo = userInfo.filter{$0.name.first.contains(searchText.lowercased())} + userInfo.filter{$0.name.last.contains(searchText.lowercased())}
                    if searchText.isEmpty {
                        userInfo = try JSONDecoder().decode(Results.self, from: data).results
                    }