Hi Dharuman, Nandha kumar (Cognizant),
Thank you for posting query in Microsoft Q&A Platform.
From the error message, it seems in the item of your array
array1
. There is no fieldName
orTitle
. So kindly make sure you are hierarchy objects has the fields correctly and same fields are getting used here.
Below is an sample example of how you can use map
and find
functions within the same expression:
map(array1, @(name = #item_1.Name, Age = #item_1.Age, Title = iifNull(find(titles, #item_2.OldTitle == #item_1.Title).NewTitle, 'MR')))
In this example, array1
is an array of objects, and each object has Name
, Age
, and Title
fields. The find
function is used to find the corresponding NewTitle
value in the titles
array based on the OldTitle
value in the array1
object. If the NewTitle
value is not found, the default value 'MR'
is used.
Hope this helps. Kindly try same as above example by using correct fields in expression. Please let me know how it goes and if still not helps, then share more details of input schema and expected output from transformation and other details. So that we can help more better.
Please consider hitting Accept Answer
button. Accepted answers help community as well.