Sign in

In Vue, get the JSON - Add, delete, check and modify the JSON data embedded in the server.

etircopyh edited in Thu, 29 Sep 2022

Problem description

Using JSON server to turn JSON into a service, you can get different data according to different suffixes, and Axios can operate on the data.!!!!!!!!!!! But!!!!!! How to add, delete, check and modify the multi-layer nested JSON data? Because it passed http://localhost : 3001 / config / user, the data in it cannot be obtained. The data is as follows: server.json

"config": {
  "user": [
      "IP": "",
      "Port": "8080"
  "tool": [
      "IP": "localhost",
      "Port": "8080",
      "LocateNodePort": "1114",
      "SettingNodePort": "1228"


The background of the problem and what methods have you tried

I want to add a new user object, but I don't know how to implement it in JSON server and Axios

I can read it, and I made a tree form,

The problem is how to add, delete and modify the interface provided by JSON server through Axios? Note: single layer can be realized

Related codes

//Please paste the code text below (do not use pictures instead of codes)

What are your expectations? What is the actual error message?

Add, delete and modify multi-layer JSON. Can only check, do not know how to add, delete and modify

0 Replies