how read specific data from nested json from lookup activity output

Prapul Kumar Dongari 116 Reputation points
2022-05-28T09:12:07.523+00:00

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 Lake Storage
Azure Data Lake Storage
An Azure service that provides an enterprise-wide hyper-scale repository for big data analytic workloads and is integrated with Azure Blob Storage.
1,338 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,535 questions
0 comments No comments
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 37,896 Reputation points Microsoft Employee
    2022-05-28T12:49:01.63+00:00

    Hi @Prapul Kumar Dongari ,

    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 additional answer

Sort by: Most helpful
  1. ELBANNOUNI.MOHAMMED 81 Reputation points
    2022-05-28T11:39:43.423+00:00

    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.

    0 comments No comments