Storing multiple nested objects in redis : <p>I would like to store multiple complex json data in redis but am not sure how</p>

<p>THis is my json structure</p>

<pre><code>"users":{

        "user01":{username:"ally", email:"all@gmail.com"},
         "user02":{username:"user2".....}
        },

 "trucks":{
         "truck01":{reg_no:"azn102", make:"subaru" .......},
         "truck02":{reg_no:"kcaher3".....}
       }
</code></pre>

<p>I have checked on 
<a href="https://stackoverflow.com/questions/8810036/complex-data-structures-redis">THis question</a> which provides a way to store the users but i would like to store users(01, 02) inside users then trucks(01, 02) in trucks so that if i want to retrieve users i can simply do </p>

<pre><code>hmget users
</code></pre>

<p>and similar case for trucks</p>

<p>Later i would also want to get user01 in users but am confused on how to store such data in redis</p>
