# db.command.remove

Update command. Deletes the specified field.

Function signature:

function remove(): Command

Sample code

Delete the style field:

const cloud = require('wx-server-sdk')
cloud.init()
const db = cloud.database()
const _ = db.command
exports.main = async (event, context) => {
  try {
    return await db.collection('todos').doc('todo-id').update({
      data: {
        style: _.remove()
      }
    })
  } catch(e) {
    console.error(e)
  }
}