PRiZM4ALL
Reel Rookie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2020
06:30 PM
Syntax Error Unexpected Token "[" and "if"
I am getting some Syntax error: unexpected token "[" and "if" and wondering if these are actual errors because they seem to work but wondering if this is correct.
Sub loadMyAccountDetail(jsonData As Object) echo(jsonData,"","==================1") jsonDataParse=parseJSON(jsonData) if jsonDataParse.data.resultCode="1" m.name.text = "Name: "+jsonDataParse.data.user_detail.name m.email.text = "Email Address: "+jsonDataParse.data.user_detail.email m.phone.text = "Phone No: "+jsonDataParse.data.user_info.[0].telephone m.address.text = "Address: "+jsonDataParse.data.user_info.[0].street m.address2.text = "Address 2: "+jsonDataParse.data.user_info.[0].street m.city.text = "City: "+jsonDataParse.data.user_info.[0].city m.state.text = "State: "+jsonDataParse.data.user_info.[0].region m.zipcode.text = "Zip Code: "+jsonDataParse.data.user_info.[0].postcode end if End Sub
I am also not finding a way to get Address 2 the second line from the Database +jsonDataParse.data.user_info.[0].street field using ./ or /n breaks the build. any thoughts..
2 REPLIES 2
boogernose
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2020
10:47 PM
Re: Syntax Error Unexpected Token "[" and "if"
needs to be moved to Developers board.
This is General Community
---A problem clearly stated is a problem half solved---.
necrotek
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2020
12:35 PM
Re: Syntax Error Unexpected Token "[" and "if"
new line is
+chr(10)