web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : vmxx238gzEtnPeUuI/xzAG
Power Automate - Building Flows
Answered

Get Value from Array

Like (0) ShareShare
ReportReport
Posted on 16 Jun 2022 22:04:38 by 6

Hi,

How can I get value of filename (93014-00001.docx) from the below array and set it in a string variable?

 

varArrayFileInfo:

 

[
 {
 "id": "2613437a-aa7f-4163-9a80",
 "isPrimary": true,
 "fileName": "93014-00001.docx"
 }
]

 

 

 

Thanks

I have the same question (0)
  • Verified answer
    abm abm Profile Picture
    32,506 Most Valuable Professional on 16 Jun 2022 at 22:36:42
    Re: Get Value from Array

    Hi @faceoff 

     

    If you got only one value value in an array then use the below.

     

    image.png

     

     

    The expression I used above is 

     

    outputs('Compose_2')[0]?['filename']

     

     

    If you have more than one value in array then use the below.

     

    image.png

     

    Above Parse JSON Schema is as follows:

     

    {
        "type""array",
        "items": {
            "type""object",
            "properties": {
                "id": {
                    "type""string"
                },
                "isPrimary": {
                    "type""boolean"
                },
                "fileName": {
                    "type""string"
                }
            },
            "required": [
                "id",
                "isPrimary",
                "fileName"
            ]
        }
    }
     
    Thanks

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2