示例如下:

var json = {'2019':'欢迎访问四个空格'}
console.log(json.hasOwnProperty('2019')); //true
console.log(json.hasOwnProperty('2017')); //false

更多详细使用方法参考:

  1. Object.prototype.hasOwnProperty()