title: Storing array of objects inside Redis and retrieving it
body: <p>We are using PHP, Redis, and Predis. We are trying to store an array of objects in Redis and then retrieve it. We notice arrays cannot be naturally be stored in Redis. What is the best way to store the array of objects and retrieve it later? Here is our array of objects:</p>
  
  <pre><code>"data": [
      {
        "doctor_id": 4, -- Use this id for getting in method get inquiry doctor offers.
        "clinic": "John",
        "distance": "10 mile"
        "city": "Los Angeles",
        "photo": "http://localhost/botox/storage/web/source/1/j4DnpszEy7epcUMf_N8QY0SRhbs7vLRG.png",
        "photos": {
           "http://path/image.jpg",
           "http://path/image.jpg1"
        }
  
        "price": "123",
        "photo": false,
        "rating": {
          "stars": null,
          "reviews": null
        },
        "add_info"=&gt; "Some information",
        "time_after_create": 942 -- in seconds.
      }
  ]
  </code></pre>