Access fields inside JSON object in Mongo DB

Hello Helical Insight,

I am using Helical Insight 4.0. I want to access the fields inside my object in MongoDB. How do I do that? If I select the object directly, I can see the entire JSON.

Thank You,
Jam

Hello Jam,

The fields inside the JSON object can be used by using “flatten” and “key-value” functions.

You can choose to create a view (at the metadata level) which flattens out the objects and gives access to the key values as individual columns. You can also use dot (.) notation as collectionName.tableName.columnName.fieldName[x].

Alternatively, at the report level, you can drag the column representing the JSON object and click on “More” option. Here, in the database functions, you have the option of JSON. Index and key value functions are available. You can use this to get the values that you want to display.

image

image

Thank You,
Helical Insight.