$str is a json object-string from client side keys are column names need to insert a new row using prepared values - i.e. corresponding key
$str
keys