Can the WeChat Mini Programs this.setData () method update an in data: {abc: {a: "b"} separately?

Page({
    data: {
        cfg: {
            num: [1, 2, 3],
            foo: function(){

            }
        }
    },

    onLoad: function() {
        this.setData({})
    }
})

I want to replace only the value of num instead of the whole cfg,. Is there a way to do that

May.10,2021

Yes: https://developers.weixin.qq.

this.setData({
    'cfg.num': []
})
Menu