I'm using json-server to host a json file, I can fetch the whole file using GET but I don't know how to get access to just a specific nested part of the json. I thought doing http://localhost:3004/data?program=Day%201 would return only the "Day 1" but instead, I got the whole file.What can I do?
{
"data": {
"user": {"username": "Pedro", "id":1 },
"program":{
"Day 1" :[
{
"muscleGroup": "Chest",
"warmUp": ["parallel bar dips"],
"main": ["Bench Press", "Inclined Bench press", "Decline Bench press"],
"secondary": ["Dumbbell Flys", "Cable Crossover Flys", "Pec-deck Fly"]
},
{
"muscleGroup": "Biceps",
"main": ["Barbell Curl", "Preacher Curl"],
"secondary": ["Hammer Curls", "Cable Curl", "Dumbbell Curl"]
}
],
"Day 2" : [
{
"muscleGroup": "Shoulders",
"warmUp": ["parallel bar dips"],
"main": ["Bench Press", "Inclined Bench press", "Decline Bench press"],
"secondary": ["Dumbbell Flys", "Cable Crossover Flys", "Pec-deck Fly"]
},
{
"muscleGroup": "Abs",
"main": ["Crunch", "Leg raises"]
}
],
}
}
}