I want to return a page with JSON server which is (https://github.com/typicode/json-server) Currently, JSON Structure is looking like:
records :[
{
id: '2',
name: 'k',
},
{
id:'3',
name:'j'
}
]
I am able to return the records with pagination as GET /records?_page=1&_limit=10. After which I have changed the structure of JSON into:-
items:{
pageCount: 3,
records :[
{
id: '2',
name: 'k',
},
{
id:'3',
name:'j'
}
]
}
Now I want to do GET /records?_page=1&_limit=10 where I expect to return page 1 with 10 records and PageCount along with it.