I wanted to know if we can write an XQuery in MarkLogic to get count of JSON documents with a key as "source1"
The staging table has multiple collections with JSON documents with below structure:
{
"source": "source1",
"name": "John",
"DOB": "1-01-1990",
"load_date": "2021-10-23 10:23:55"
}
I'm trying to get the total number of documents with the source as "source1". i.e,
Select count(*) from data-hub-staging where source='source1'