Pick up first and last result with Json and Retrofit

By | October 30, 2018
Questions:

How to get only 2 items from an Api. In the case the first and last.
I want to get the first and last thing like this:
01 ~ 05

"capitulos":{  
            "dados":[  
               {  
                  "id":"169461",
                  "capitulo":"01"
               },

               {
                  "id":"16942",
                  "capitulo":"02"
               },
      
               {
                  "id":"169463",
                  "capitulo":"03"
               },

               {
                  "id":"169464",
                  "capitulo":"04"
               },
     
               {
                  "id":"169465",
                  "capitulo":"05"
               },
              ] 
             },
Answers:

Leave a Reply

Your email address will not be published. Required fields are marked *