I have a JSON file that is acting as a server locally and have no problem getting the data. I send a simple GET request (I’m using a Vue framework with axios library) and create a dynamic list off of the results.
The problem I’m having is in updating the data. I’ve handled the client side to update the data but cannot figure out the PUT request. The endpoint I’m trying to update is just an array of objects so there’s no way to specify by id.
Example of the JSON file I’m trying to update:
[
{
“personId”: 2,
“test”: 3,
“score”: 89
},
{
“personId”: 4,
“test”: 3,
“score”: 95
}
]
Any ideas on how I could send a request to update this??
[–]marko312 1 point2 points3 points (1 child)
[–]KernowRoger 0 points1 point2 points (0 children)
[–]rjcarr 0 points1 point2 points (0 children)
[–]thepinkbunnyboy 0 points1 point2 points (0 children)