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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / how to get all the ite...
Power Automate
Unanswered

how to get all the items from array/Select instead of one item

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi All,

 

Select (action) has many items in the collection, when I am trying to get a list of items it returns only the first item.

[
 {
 "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups(id,displayName)",
 "value": [
 {
 "id": "99b3391d",
 "displayName": "GAAD"
 },
 {
 "id": "0a12462f",
 "displayName": "BAAD"
 }
 ]
 }
]

 

muralikrishna12_0-1668966196366.png

from the above screenshot, we can see it returned only one item from the collection.

 

Any help to get all the items instead of one row/item

here is the formula that is currently being used.

 

Item()['value']?[0]?['id']
Item()['value']?[0]?['displayName']

also tried like 
Item()['value']?[0]['id']
Item()['value']?[0]['displayName']

also tried like 
Item()['value']?[0]['id']
Item()['value']?[1]['displayName']

muralikrishna12_1-1668966654221.png

 

 

any assistance on how to get all the array items?

 

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,784 Most Valuable Professional on at

    Hi @Anonymous,

     

    You are using an index [0]. This means you are only retrieving the first item.

     

    I would use the value property in the From field of the Select action. This way you can use/map the properties of the value array in the Map field. 

     

    I assume currently you are using the body of the Invoke an HTTP request 2 action in the Set variable action?

     

    Use the below expression instead to retrieve the value property:

     

    body('Invoke_an_HTTP_request_2')['value']

     

     

    In the map field you could refer to the specific properties of that array by using the item()?['nameofpoperty'] format.

     

    id would be:

     

    item()?['id']

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    what if we have another array in the Json object ?

    here is the invoke an HTTP output

    {
     "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#users('cc0-975b-e658c2672639')/licenseDetails",
     "value": [
     {
     "id": "htXLQs5wFWA",
     "skuId": "cb42ce701560",
     "skuPartNumber": "POWER_BI_PRO",
     "servicePlans": [
     {
     "servicePlanId": "440-bddc-54d774bf0318",
     "servicePlanName": "EXCHANGE_S_FOUNDATION",
     "provisioningStatus": "Success",
     "appliesTo": "Company"
     },
     {
     "servicePlanId": "bfd3-562de28bd4ba",
     "servicePlanName": "BI_AZURE_P2",
     "provisioningStatus": "Success",
     "appliesTo": "User"
     }
     ]
     }

    we are trying to get the user license and sublicense as well.

    So i can able to get the first-level license details(id, skuid, skuPartNumber)

    but not from the "servicePlans" field values.

    muralikrishna12_0-1669203063075.png

     

    any assistance please add Serviceplan(Sub-License) array fields into the current license.

     

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 286

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard