title: Flask - How to save a JSON data each key to it column
body: <p>I am trying to save a JSON data automatically in database but each key should get saved in it column:</p>
  
  <pre><code>class Users(UserMixin, db.Model):
      __tablename__ = 'users'
  
      id = db.Column(db.Integer(), primary_key=True)
      firstname = db.Column(db.String(100))
      lastname = db.Column(db.String(100))
      email = db.Column(db.String(120), unique=True)
      telephone = db.Column(db.String(15))
      fullname = db.Column(db.String(100))
      address1 = db.Column(db.String(100))
      city = db.Column(db.String(50))
      country = db.Column(db.String(50))
      region = db.Column(db.String(50))
  </code></pre>
  
  <p>JSON data is as following:</p>
  
  <pre><code>user_info = {
      'firstname': 'Test1', 
      'lastname': 'Test2', 
      'telephone': '1234567890', 
      'city': 'City 1', 
      'email': 'example@gmail.com', 
      'address1': 'Address', 
      'country': 'America', 
      'region': 'Whatever'
  }
  </code></pre>
  
  <p>is there any way to automate that, something like:</p>
  
  <p>user = Users.query.save(user_info)</p>