How can I prevent the warning 'Property MyProp1 never defined on MyObject'?

后端 未结 5 1975
既然无缘
既然无缘 2021-01-11 10:43

I have some HTML that contains a JSON string. In the on DOM ready callback, I have something like this:

MyObject = JSON.parse($(\'#TheJsonString\').         


        
5条回答
  •  南笙
    南笙 (楼主)
    2021-01-11 11:21

    
    
    
    
    
    {"bindings": "hr", "method":"asd"}

    I tested it like this, but it works fine without any warnings.

提交回复
热议问题