Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Is there a way to extract the "Attributes" data from this JSON?

(0) ShareShare
ReportReport
Posted on by 12

Hi All,

 

I'm currently trying to create a flow that tracks the updates to an ArcGIS online feature layer. I was wondering if there was a way to extract the Attribute data from the following code so I can reformat it into a more user friendly appearance in an email.

 

I'm a JSON and Power Automate newbie, so any and all suggestions would be great. Thanks in advance! 

{
 "layerServerGens": [
 {
 "id": 0,
 "serverGen": 458189
 }
 ],
 "transportType": "esriTransportTypeUrl",
 "responseType": "esriDataChangesResponseTypeEdits",
 "edits": [
 {
 "id": 0,
 "features": {
 "adds": [],
 "updates": [
 {
 "geometry": {
 "rings": [
 [
 [
 2556265.90578417,
 482548.2758253
 ],
 [
 2561942.66804101,
 482305.347848049
 ],
 [
 2562932.3081841,
 476869.569885384
 ],
 [
 2555554.10480682,
 476454.314157847
 ],
 [
 2556265.90578417,
 482548.2758253
 ]
 ]
 ]
 },
 "attributes": {
 "OBJECTID": 45,
 "GlobalID": "F35B148D-1294-4CAC-8203-CA190FE96EF8",
 "OutageType": null,
 "AlertType": "BW",
 "AlertDetails": null,
 "ScheduledOutage": null,
 "ScheduledServiceRestoration": null,
 "AdditionalResources": null,
 "Status": "A",
 "CustomersAffected": null,
 "InternalComments": null,
 "OutageDetails": null,
 "Division": "SO",
 "Submitter_Name": "Austin Test"
 }
 }
 ],
 "deleteIds": []
 }
 }
 ]
}
  • AustinWolf Profile Picture
    12 on at
    Re: Is there a way to extract the "Attributes" data from this JSON?

    That worked beautifully! Thank you so much for your help 

  • Verified answer
    Ellis Karim Profile Picture
    10,912 Super User 2025 Season 1 on at
    Re: Is there a way to extract the "Attributes" data from this JSON?
     

    Here is the high-level flow:

    ekarim2020_16-1631814535986.png

    Here are the details. Your data was pasted into a Compose action:

    Compose Data.png

    Then we use an expression to select the attributes:

    ekarim2020_5-1631813112979.png

    You can copy the expression below:

     

    outputs('Compose_Data')?['edits'][0]['features/updates'][0]['attributes']

     

    To get the ObjectID or any other property we can use the following expressions:

    2021-09-16_18-34-28-OID.png

    Here are the expressions to get the other properties:

     

    outputs('Compose_Attributes')?['OBJECTID']
    outputs('Compose_Attributes')?['GlobalID']
    outputs('Compose_Attributes')?['OutageType']
    outputs('Compose_Attributes')?['AlertType']
    outputs('Compose_Attributes')?['AlertDetails']
    outputs('Compose_Attributes')?['ScheduledOutage']
    outputs('Compose_Attributes')?['ScheduledServiceRestoration']
    outputs('Compose_Attributes')?['AdditionalResources']
    outputs('Compose_Attributes')?['Status']
    outputs('Compose_Attributes')?['CustomersAffected']
    outputs('Compose_Attributes')?['InternalComments']
    outputs('Compose_Attributes')?['OutageDetails']
    outputs('Compose_Attributes')?['Division']
    outputs('Compose_Attributes')?['Submitter_Name']

     

    Sample output after run time:

    ekarim2020_15-1631814420301.png

    Hope this helps.


    Ellis
    ____________________________________
    If I have answered your question, please mark the post as Solved.
    If you like my response, please give it a Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow