Ok, so I have an API written in ExprerssJS where I am fetching a value from the Database using Sequelize raw query. Somehow the return JSON result contains backshlashes around the JSON key value e.g. {\"application_id\":1510}.
When I use JSON.parse(JSON.stringify('{\"application_id\":1510}')) inside my expressJs service, it doesn't do anything with supplied JSON object and spits out the input as output.. i.e. no changes though when I use execute this same statement from node command line, I get the desired results where those "" are removed.. see below... This is all on my Mac using same node version. I even tried to run this same command within the Chrome browser's console and can get those "" removed. It just doesn't work within the ExpressJS code.
MC02YC4FLJG5J:~ Dev$ node Welcome to Node.js v16.14.2. Type ".help" for more information.
JSON.parse(JSON.stringify('{\"application_id\":1510}'))'{"application_id":1510}'
Any idea why it behaves differently?