My json looks like the following,
[
{
"key1": 1,
"key2": "val2"
},
{
"key1": 2,
"key2": "val2"
}
]
This json comes in string format and I want the objects in the json array to be inserted as individual records in mongodb. I referred to https://labix.org/mgo but wasn't able to find enough examples on the above use-case. Appreciate your thoughts in finding a solution.