cancel
Showing results for 
Search instead for 
Did you mean: 

Reading JSON Format

amit_saroha
New Contributor III

Hi,

How I can use an expression to read the below in a mapper to get individual values true or false? I am using as - $DocumentId.startsWith(“EBSPERSON_”)

[

{

"Content_ID":

"EBSPERSON_547229"

}

{

"Content_ID":

"EBSPERSONAD_547229"

}

{

"Content_ID":

"EBSPHONE_547229"

}

]
18 REPLIES 18

amit_saroha
New Contributor III

Thanks,
HCM Insert Person Records_2022_06_28.slp (65.9 KB)
@Dheeraj - I have attached the pipeline.

Dheeraj
Employee
Employee

@amit.saroha
I won’t be able to validate your pipeline as it needs accounts to connect to the systems. In scenarios like this, it would be great if you can export the data to a JSON generator snap and work on the expressions it would be a lot simpler and easier to debug.

I am attaching a sample pipeline where I tried to replicate your data and worked on the expression.
Test Expr - Community_2022_06_28.slp (3.6 KB)

amit_saroha
New Contributor III

@Dheeraj , thanks for your help but the sample data is not like the way I have. I have the below data coming out of mapper -

image

In the another mapper when I use it the below error comes -

image

amit_saroha
New Contributor III

I just want the value from this like shown below -

image

amit_saroha
New Contributor III

I have uploaded the JSON file as well id someone wants to give it a try.

Mapper1_output0.json (144 Bytes)