I have the following db.json
{
"cases":{
"TotalCount":1,
"StartingPageNumber":1,
"Data":[
{
"Id":1,
"CaseNumber":"1234",
"CaseDescription":"Descpp something",
"CaseDate":"08-28-2020"
},
{
"Id":2,
"CaseNumber":"4567",
"CaseDescription":"Descpp somthing again",
"CaseDate":"08-28-2020"
},
{
"Id":3,
"CaseNumber":"7654",
"CaseDescription":"also an Descpp",
"CaseDate":"08-28-2020"
},
{
"Id":4,
"CaseNumber":"3322",
"CaseDescription":"again a Descpp",
"CaseDate":"08-28-2020"
}
]
}
}
my url looks like http://localhost:3000/cases
. I can see all the data but when I just want to retrieve only case with Id 1 from the Data
I have been doing alot of reading / trying over past couple of days on how to acess Data
inside of json using the json-server
to mock apis, can someone guide me in the right direction please.