Home > front end >  How to get the json data ajax wants the value
How to get the json data ajax wants the value

Time:09-26

Through ajax a string of data obtained from the service side

Now I need to get success in the aid of value, and then through the aid of value judgment to the request of the other table data, the front what I use is layui

CodePudding user response:

Res., data=https://bbs.csdn.net/topics/array (screenshot data?

Res. Data. ForEach (item=& gt; {
//do judgment here
The console. The log (item. Aid)
})

CodePudding user response:

For example,
Success: the function (res) {
Res is you pictures inside the results callback
If this is vue can enclosing list=res. Data
}
V - for="item in the list
"Write a @ click inside="clickItem (item. Aid)"
Inside a click event such automatically with each aid can provide you with processing
Otherwise, use the method of upstairs to judge

CodePudding user response:

Thank you bosses, solved the
  • Related