I\'m playing around on https://www.documentdb.com/sql/demo, which allows me to query against sample documents that look like:
{
\"id\": \"19015\",
\"desc
Using a UDF, as Larry Maccherone mentioned, has the disadvantage that it does not use the collection's index. A UDF should only be used in (very) small collections or in combination with criteria that use the collection's index.
A good solution for this problem is currently missing in DocumentDB. I would advice to vote on the following item: https://feedback.azure.com/forums/263030-documentdb/suggestions/14829654-support-sub-query-functions-like-exists-not-exist