I have created an azure function that gets triggered when a new document is added to a collection.
public static void Run(IReadOnlyList<Document> input, ILogger log)
{
if (input != null && input.Count > 0)
{
log.LogInformation("Documents modified " + input.Count);
log.LogInformation("First document Id " + input[0].Id);
}}
Is it possible to select a particular document from this collection and then query the data in that selected document?
Eg. in the collection called clothescollection, i have a document that has an id:12345Tops. I want to query the data found in the document with the id:12345Tops.
Or alternatively retrieve the 1st document in the collection, and then query that 1st selected document
i have viewed azure functions with http triggers: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-cosmosdb#trigger---attributes
but i need to use cosmosdb trigger as this needs to be triggered when a document is added to the collection.