Looking to return a page using JSON server found at https://github.com/typicode/json-server. The current JSON structure appears as follows:
records :[
{
id: '2',
name: 'k',
},
{
id:'3',
name:'j'
}
]
Successfully able to return records with pagination using GET /records?_page=1&_limit=10. Recently updated JSON structure to:
items:{
pageCount: 3,
records :[
{
id: '2',
name: 'k',
},
{
id:'3',
name:'j'
}
]
}
Now aiming to GET /records?_page=1&_limit=10
to return page 1 with 10 records and include PageCount
.