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

Below is the actual data and I want to pass the value “EBSPERSON_547229” in the target path.

image

Use below expression :

jsonPath($, "$_Document_ID[?(value.Content_ID.startsWith('EBSPERSON_'))].Content_ID")

amit_saroha
New Contributor III

Thanks, @Dheeraj - But it didn’t work ☹️

Incorrect image please ignore

image

Dheeraj
Employee
Employee

I see your JSON is not formatted properly. I would recommend validating the JSON snippet using some external validators
You can also attach your pipeline here and I can look into that