Problem with JSON.parse in nested json object string
I have a author object as:
var a = {"firstName":"abhi", "lastName":"pat"}
Am using the JSON parse with other data as:
JSON.parse(`{"name": "u", "author": "${a}"}`)
I got the the output as:
{name: "u", author: "[object Object]"}
The expected output is:
{name: "u", author: {firstName: "abhi", lastName: "pat"}}
Can anyone suggest me the right way to parse it?