js带“.”的对象属性名怎么使用


问题:这样的json对象(event)

{
  "title": "title", "alert":"ding", "extras":{ "yourKey": "yourValue", "cn.jpush.android.MSG_ID": "1691785879", "app": "com.thi.pushtest", "cn.jpush.android.ALERT": "ding", "cn.jpush.android.EXTRA": {}, "cn.jpush.android.PUSH_ID": "1691785879", "cn.jpush.android.NOTIFICATION_ID": 1691785879, "cn.jpush.android.NOTIFICATION_TYPE": "0" } }
中的"cn.jpush.android.ALERT"属性怎么使用?

用event.extras.
cn.jpush.android.ALERT是访问不到的。
正确方法:event.extras[
"cn.jpush.android.ALERT"]


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM