Hi;
I have view several of the other posts relative to json errors but they seem really complicated so......
Here is my test code modified to my elements but taken from the internet:
- <script type="text/javascript" >
var tables = {
'tbl_name' : 'Costs',
'tbl_name' : 'rdata',
'tbl_name' : 'show',
'tbl_name' : 'sqlite_sequence'
}
// var tables= { "tbl_name":"Costs", "tbl_name":"rdata", "tbl_name":"show", "tbl_name":"sqlite_sequence" }; <== tried this - didn't work
alert(JSON.parse(tables));
</script>
The date type is object and I am trying to turn it into json format. The above gives me this error.
SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data testRenoDB.php:62:12
I can't view what the flawed json is so don't have a clue how to fix this. I use firefox Web Developer tools on Ubuntu 18.04 to try to debug this but I don't know how to use it very well.
Thanks in advance for help.
R