question

PrapulKumarDongari-0385 avatar image
0 Votes"
PrapulKumarDongari-0385 asked PrapulKumarDongari-0385 commented

how read specific data from nested json from lookup activity output

hi ,
iam reading a nested json from lookup activity i need to pass specific column to activities inside foreach activity so what is the logic i need to pass in foreach to read json values

![206363-image.png][1]


azure-data-factoryazure-data-lake-storage
image.png (47.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ShaikMaheer-MSFT avatar image
0 Votes"
ShaikMaheer-MSFT answered PrapulKumarDongari-0385 commented

Hi @PrapulKumarDongari-0385 ,

Thank you for posting query in Microsoft Q&A Platform.

It would have been easy to guide you exact expression to use if you have shared full output json of lookup activity.

But still, assuming You are getting entire json shown in question under value property array of look up activity output json. You should consider using writing below expression to pass events array to ForEach acitivity.
@activity('<your lookup activity name>').output.value[0].events

ForEach activity iterate over items in the events array. Inside Foreach if you would like to access every item then use @item() expression.

For example, If to get policyholderLocator property inside Foreach, use below expression.
@item().data.policyholderLocatory.

Please check below video to get more idea of writing expressions.
How to read JSON output of one Activity in to another Activity in Azure Data Factory

Hope this helps. Please let us know if any further queries.


Please consider hitting Accept Answer. Accepted answers help community as well.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks @ShaikMaheer-MSFT for your valuable solution , it worked for me.

0 Votes 0 ·
ELBANNOUNIMOHAMMED-6711 avatar image
0 Votes"
ELBANNOUNIMOHAMMED-6711 answered

Le JSON se présente sous la forme d'une chaîne de caractères —utile lorsque vous souhaitez transmettre les données sur un réseau. Il a donc besoin d'être converti en un objet JavaScript natif lorsque vous souhaitez accéder aux données. Ce n'est pas vraiment un souci puisque le JavaScript fournit un objet global JSON disposant des méthodes pour assurer la conversion entre les deux.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.