data table has 30 fields, and the json passed from the front end corresponds to 10 fields. How to easily modify the values of these fields.
Front-end json:
{
name: "a",
active: "play"
}
I don"t want to assign values explicitly, such as
mydb.name = json["name"]
mydb.active = json["play"]
you can"t write 30 assignments.
is there a way to solve this problem in a way similar to cyclic traversal assignment.
ask all the gods to help