title: How to save a server response array in UserDefaults for later use in Swift?
body: <p>when a user login, I get an answer from server that contains an array like this:</p>
  
  <pre><code>{"answer":{"id":26,"username":"iosuser","address":"iosios","phone_number":"123123123","email":"gmail@gmail.com","created_at":"2019-02-02 12:42:50","updated_at":"2019-02-02 21:40:29","provider_id":"1","is_loged_in":1,"user_id":"24","user_type":1}}
  </code></pre>
  
  <p>How to save this array's data in userdefaults and use it later for example in a profile page?</p>
  
  <p>Any help much appreciated.</p>