MongoDB string to object Id

Five Stars

MongoDB string to object Id

Hi,

 

I want 2 things:

1. I am doing a lookup with a master and want to bring the reference value and its objectId. The objectId is converted to string. Is there any way to convert string to object id type?

 

2. Any way to generate an object ID for nested objects?

 

Thanks in advance.

 

Ravinder

Moderator

Re: MongoDB string to object Id

Hello,

Could you please take a look at this article about:https://stackoverflow.com/questions/8503673/how-to-convert-string-into-objectid to see if it helps?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads