I mean, not really, that’s just what the function does. It’s not Electron trying to do anything helpful, it’s a question of what your input is.
So with your template string, you’re turning your JSON into a string, and dumping that string into the rest of the string, so you have one big string with some JSON in it.
Think about it like this, if you didn’t stringify, you’d be running
init using the string
[object Object], because that’s how objects are evaluated when using
toString. It’s a case of delimitation, like I said before, if you wrapped it in
', the function would recognise your JSON blob as a string and not an object and treat it as you were expecting.