Considering that you are working with strings:
var s = JSON.stringify([{"id":1, "name":"firstname"}, {"id":2, "name":"secondname"}])
var result = s.substring(1, s.length - 1)
Given that I’m not sure you really need something like that.
solved remove JSON array in node js