Customer Portal

MongoDBReader get object id

Comments 2

  • Avatar
    Lukas Cholasta
    0
    Comment actions Permalink
    Hi

    The '_id' contains an object called ObjectId. This is why you get '_id = {"$oid" : "..."}'. Unfortunately, the MongoDBReader is not capable to obtain the string representation of the ObjectId. There are three approaches. You can parse the returned _id yourself using Reformat component, or you can use JSONReader to parse it for you, or use MongoDBExecute component to get the string representation of the ObjectID directly from the database. I attached a simple example graph, where the above is shown.

    Hope this helps.
  • Avatar
    gbrocks
    0
    Comment actions Permalink
    I get it. Thank you Lukas Cholasta.

Please sign in to leave a comment.