So I have a problem. I have a base serde_json Value that goes like this:
{
"person": [
{
"country": "Jamaica",
"name: "John",
},
...
],
...
}
I can easily insert one object as:
{
"person":
{
"country": "Jamaica",
"name: "John",
}
}
But I have no idea how to add them dynamically into an array like in the first example. I used to do it with push
with the json
crate, but this doesn't seem to exist with serde_json
. Any ideas?