Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 12:50 AM
Hi Team,
I am trying to read an attribute(1star) from the below JSON from the POST API.
{
"account": {
"1star": "1000094"
}
}
When I try to read this attribute it shows an error 'parsing error: identifier directly after number'
I am trying to read it like this - var account1star_number = account.1star;
how to solve this error?
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 01:01 AM
Hi,
Run below in background-
var t={
"account": {
"1star": "1000094"
}
}
gs.info(t['account']['1star'])
Thanks and Regards,
Saurabh Gupta
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-05-2023 01:01 AM
Hi,
Run below in background-
var t={
"account": {
"1star": "1000094"
}
}
gs.info(t['account']['1star'])
Thanks and Regards,
Saurabh Gupta