I have this JSON Object :
{
"name": "test.counter",
"value": 1.234,
"ts": 1234567890
}
And I would like to store the entire thing in a JSON array so it could look like this:
[
{
"name": "test.counter",
"value": 1.234,
"ts": 1234567890
}
]
How can I do this? I'm kind of new to Golang. EDIT: I'm creating the JSON object
output := &Output{
Name: url[0],
Milli: ms,
Epoch: time.Now().Unix(),
}
out1, _ := json.Marshal(output)