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