I have created a parameter with name p_persondetails of OBJECT type, below is the paramater value.
{
"property_name": {
"key1": "value1",
"key2": "value2"
"key3": "value3"
"key4": "value4"
}
}
I have created another parameter with name object_list of arrays and it contains the value ["key1","key2","key3","key4"]
I am using foreach loop in ADF so on each loop and my foreach statement is as below
@pipeline().parameters.object_list
My requirement is that depend upon selected item in foreach activity, I need a dynamic parameter for copy activity based on p_persondetails parameter of object type. I have used below in ADF expression builder for one of the dependent parameters for source data set of copy activity, I am getting error.
Expression: @pipeline().parameters.p_persondetails.property_name[item()]
Error:
The expression '@pipeline().parameters.p_persondetails.property_name[item()]' cannot be evaluated because property 'property_name' cannot be selected. Property selection is not supported on values of type 'String'.
So, to try this further I also used something like below by giving the direct value instead of current item from foreach activity. and it didn't work either
@pipeline().parameters.p_persondetails.property_name['key1']
FYI, the type of source dataset parameter is String as it is expecting string output values from p_persondetails (object type parameter). Can anyone help me figure out a solution for this.