Make complex MongoDB URLs from a friendly JSON object in Node.js