title: how to display nested json array in android recyclerview
body: <p>I am getting json as below.</p>
  
  <p>How to display purchases array in android recyclerview?</p>
  
  <p>Any advice please? number of purchases will be random.
  Do I have nested recyclerview or listview?</p>
  
  <pre><code>{"data": [
   {
     "id": 1,
     "name": "foo",
     "purchases": [
       {"id":10,
        "amount": 500
       },
       {"id":15,
        "amount": 400
       }
     ] 
   },
   {
     "id": 2,
     "name": "bar",
     "purchases": [
       {"id":11,
        "amount": 600
       },
       {"id":13,
        "amount": 1000
       },
       {"id":15,
        "amount": 2000
       },
     ] 
   },
   {
     "id": 3,
     "name": "zoo",
     "purchases": [] 
   }
  ]}
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/a3OGh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a3OGh.png" alt="enter image description here"></a></p>