โ01-29-2021 10:45 PM
Hi,
when I am trying to access Col Desc field in child pipe line getting the below error
sample JSON
{
โStyleโ:โPenโ,
โCol Descโ: โBlackโ
}
โfailureโ: โValidation errors:\nproperty_map.settings.transformations.value.mappingTable.value[4].expression.value: Expression parsing failed near โ _content). >> [ << 'รol Desc (Reason: Mismatched input โ[โ at line 1:21. Expecting one of: {, โ||โ, โ&&โ, โ^โ, โ==โ, โ!=โ, โ>โ, โ<โ, โ>=โ, โ<=โ, โ+โ, โ-โ, โ*โ, โ/โ, โ%โ, โ?โ, โinstanceofโ, โinโ, โmatchesโ}; Resolution: Please check expression syntax)\nโ,
Solved! Go to Solution.
โ02-01-2021 10:33 AM
Hi, attaching the pipelines for your reference that work both with eval and JSON.parsetest child properties_2021_02_01.slp (5.1 KB) mapper_2021_02_01.slp (3.8 KB)
let me know if you have any questions.
โ01-30-2021 05:15 PM
If you are trying to get the value of something passed to the pipeline in a pipeline parameter, you will have to parse the JSON fiorst, then you can access the field, use an expression like:
JSON.parse(_content)[โCol Descโ]
โ01-31-2021 06:05 PM
Thanks For the reply โฆ
when I am using the JSON.parse(_content)[โCol Descโ] getting the below error.When I use the suggestion which snaplogic provided(Error Resolution) then the values are coming as null.
โ02-01-2021 10:33 AM
Hi, attaching the pipelines for your reference that work both with eval and JSON.parsetest child properties_2021_02_01.slp (5.1 KB) mapper_2021_02_01.slp (3.8 KB)
let me know if you have any questions.
โ02-02-2021 07:06 AM
Thanks it workedโฆ