title: Persistent storage to store one set of key-value pairs in iOS Swift
body: <p>I want persistent storage(persistent across views) for my app, I came across Realm, but now I think its just too heavy for what I am trying to do.</p>
  
  <p>Basically I have data in JSON format(which I fetch every time the app starts, I want to store it in a variable(in a Dictionary) so I can access it from different screens of my iPad app. (I also don't care if the data gets lost when the app is closed, I just want the data to be available across different screens(views) of my app when app is running)</p>
  
  <p>Example Data</p>
  
  <pre><code>{
      "pid": 23,
      "name": "some name",
      "cities": [ {
                    "id": 1,
                    "name": "Bangalore"
                  },
                  {
                    "id": 2,
                    "name": "Mysore"
                  }
                  { //continues for about 100 more city entries
                  }
                ],
      "hospital": {
                    "id": 234, 
                    "name": "newHorizon", 
                    "type": "nursing home"
                  }
  }
  </code></pre>
  
  <p>Is Realm a suitable option for this? If yes, how do I fetch say <code>hospital-&gt;name</code> from my example data?</p>
  
  <p>If not, what kind of storage is suitable in this case?</p>
  
  <p>I am looking for ios equivalent for <code>localStorage</code> of Javascript</p>