I am currently extracting data from a JSON array that looks like the following
"title": Title,
"chapters": {
"13c": {
"words": 123,
"spaces": 321
},
"15d": {
"words": 123,
"spaces": 321
},
"38h": {
"words": 123,
"spaces": 321
}
}
The thing is when I try to select 13c (if it exists) with the following
if(book.chapters.13c){
console.log(book.chapters.13c);
}
I get the following error:
Uncaught SyntaxError: Unexpected token ILLEGAL