Find all field paths in MongoDb collections that has a url

Viewed 12

I have with MongoDb database with many collections;

What I want is to find is all Fields that may have a URL...

For Example::

A collection may have two fields:

Section Collection

image : <url> 
some_url : <url>

User Collection

photos : [ <url-1>, <url-2> ]

I am NOT interested in the url values... just the list of collections and fields that have any type of url ... say

example.com

The purpose of this to write a query to change the domain name of all such urls in one go

Any assistance in this query would be a great help...

Changing from say domain1.com to domain-xyz.com

0 Answers
Related