Suppose I have a table like the following:
id| name | family
---+------+---------
1 | iman | marashi
2 | mike | ...
3 | john | ...
4 | |
and I also have an Json object to insert to the table like the following:
{"name ":"will","family":"smith"}
How can I insert together an Json object to a table given that the fields of the table and the keys of the Json object are the same?
Without having to parsing the Json object.
I don't want to use this method:
$name = $data["name"];
$family = $data["family"];