We all know that we can save one document at a time in cosmos DB using Azure functions (using out parameter or using return) like:
object outputDocument = new { id = Guid.NewGuid().ToString(),
customObjList= objList
};
where objList is a list of custom object. Now the above outputDocument will return one json Document and the data in DB will be saved in the below format.
{
"id" : "....",
"customObjList" :[
{
"_id" : "81afbe1a-3da0-4143-9dc6-0b3bf5252e0d",
...
},
{
"_id" : "2af7e1ac-15ca-424e-8af1-d3e5a2cca8de",
....
},
.....
]}
But what I want is something like below list of documents to be saved directly from Azure functions
/* 1 */
{
"_id" : "81afbe1a-3da0-4143-9dc6-0b3bf5252e0d",
...
}
/* 2 */
{
"_id" : "2af7e1ac-15ca-424e-8af1-d3e5a2cca8de",
....
}
[To me the requirement is to fetch the data from rss feed and save it to cosmos DB, which I am first reading it and storing the data in a list of object but unable to save those list of object independently in cosmos DB]