Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to parse android attributes from JSON converted from XML in Javascript?

I am trying to parse android:versionName from following JSON object :

{
    "android:hardwareAccelerated": "true",
    "android:versionCode": "40020",
    "android:versionName": "4.0.20",
    "package": "com.xxx.xxx",
    "xmlns:android": "http://schemas.android.com/apk/res/android"
}

can anybody help me in this??

Thank you in advance

like image 431
Chetan Purohit Avatar asked Mar 05 '26 09:03

Chetan Purohit


1 Answers

Use it like this Object['key'] - Property accessors - Bracket

for your JSON it will (Obj is just a representation of JSON Object):

obj['android:versionName']
like image 58
Sudhindra_Chausalkar Avatar answered Mar 06 '26 22:03

Sudhindra_Chausalkar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!