Let's POWER Automate

From no-code to low-code

Menu
  • Expressions
  • Filters
  • General
  • Application specific solutions
    • Dataverse
    • Excel
    • Forms
    • Outlook
    • Planner
    • Power Apps
    • SharePoint
    • Teams
  • Triggers
  • Ready to use solutions
    • Approval Process Solution
    • Task Delegation App
    • The Ultimate Power Automate expressions cheat sheet
    • Power Automate HTTP requests to SharePoint cheat sheet
    • Power Automate HTTP requests to Graph API cheat sheet
  • ABOUT ME
  • Get help with your flow
  • POWER PLATFORM SERVICES
Menu

How to select specific values from an array in Power Automate

Posted on February 2, 2022February 6, 2022 by Tom

“I’d like to copy a multiple choice SP field to another item, what’s the best way to select only the values from the array with Power Automate?”

“I need to extract only the user email addresses, I don’t need all the other user information.”


Working with Power Automate often involves working with arrays. Sometimes it’s a simple array, but more often it’s an array of objects. And with arrays of objects there’s a difference between what you get and what you can use. For example the SharePoint multiple choice column. You’ll get 3 properties for each of the choices, but you’ll need only the “Value”.

The same applies to multiple people picker. You get all the user information, but in most cases you need only the email address.

How do you then extract only the desired values, ideally in the required format?

Use the ‘Select’ action

The action you’re looking for is ‘Select’. You’ll input an entire array of objects and select what values it should return. The action has even an option to return a simple array with the values, or another array of objects.

Select only values

You can switch the action to return a simple array by pressing the small button – it’ll keep only 2 fields visible. Enter the whole array in the ‘From’ field, and select which value you want to return in the ‘Map’ field.

Power Automate select values from array

This is often used in combination with the join(…) expression to turn the values into a string. For example, if you want to send a single email to multiple users at once.

Select values and turn them into array of object

The other option is to return an array of objects. If you keep it in the original mode, with 3 fields, you can input the array, select what values it should return, and define the property key for the value.

Power Automate select values from array

This approach is used when you want to copy the values to another place and you need them in a specific format. For example, to update multiple people picker column or a multiple choice column.

Summary

‘Select’ is one of the most powerful actions in Power Automate, it’s the easiest way to get values from an array. Instead of looping through all the objects and appending the values in a variable, you can have a single action. All you need is to find the right format of the array, and ‘Select’ it accordingly.


πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

19 thoughts on “How to select specific values from an array in Power Automate”

  1. Beth Beck says:
    March 22, 2022 at 10:22 pm

    Hi Tom,
    I have been trying this with a multi-select choice field and the output of the Select action is just like yours, except for with my column “Building” and the building values. I then need to send an email with the building values listed in the body. I can’t figure out how to get just the values. I’ve created a Join action after the Select action, but the email body looks like this:
    {“Value”:”Building 1″},{“Value”:”Building 4″},{“Value”:”Building 7″}

    How do I remove all the “value” text and characters and just get Building 1; Building 4; Building 7

    Thanks,
    Beth

    Reply
    1. Tom says:
      March 27, 2022 at 7:08 pm

      Hello Beth,
      you should switch the ‘Select’ action to the text input only mode, without the Key value as shown on the screenshot.

      Reply
  2. Luke says:
    May 9, 2022 at 11:49 pm

    Thank you for this post! It has helped me immensely!

    Reply
  3. Fran Lyons says:
    August 12, 2022 at 7:13 pm

    Hi Tom, This helped me a lot, but I need to extract one item from an array (department column) that matches the department field in a single item on another list.

    Source list: Department (single line of text, unique values only)
    Contact (value changes)

    Example: Department = Finance
    Contact = John Smith

    Destination: Department, Assignee, Manager, Contact
    Example: Department = Finance (manually chosen from lookup)
    Contact =

    Objective: Src Department value = Dest Department value then update Dest with current Contact and item ID

    The reason I have to do this through automate and not lookups is that this is part of a complicated time tracking process and this information will be sent to multiple lists that fulfill different objectives.

    Using your steps to Select from the array, I was able to get a list of departments. However, I need to compare Source to Destination in order to update the Destination list with the Department’s current contact.

    Let me know if this is an overreach! I’ve been struggling with this issue for about 3 months and I haven’t found a solution.

    Thank you!

    Reply
    1. Tom says:
      August 21, 2022 at 6:59 pm

      Hello Fran,
      from the description I’d think that you need a lookup to find the value in the other list as described here: https://tomriha.com/how-to-lookup-data-in-another-sharepoint-list-in-power-automate/. ‘Get items’ with a Filter Query to find the corresponding department and then use the returned item to update the Contact information.

      Reply
  4. Ian says:
    November 24, 2022 at 3:44 pm

    Hi Tom

    This seems to be exactly what i need but i’m getting stuck with automate creating extra for each loops.

    I am taking one SharePoint list and copying entries into another. Because any field that includes multiple values e.g. tags and people come out as an array of objects with lots of parts but can only be entered as an array of single values e.g. email addresses for people i need to strip them down. So within a for each stepping through each item in the list I need to pre-format those date types.

    However, I’m getting unstuck with the select action. I think i’m selecting the right dynamic content for the array (for the specific list item) for the ‘from’ input but i don’t seem to be able to create the map. Whenever i select anything that refers to the part of the object i need (e.g. the email address) automate then wraps the select action into an extra for each loop and (it’s not giving me just the options for items within the array selected in the from box).

    Any idea where im going wrong?

    Reply
    1. Tom says:
      December 5, 2022 at 8:00 pm

      Hello Ian,
      I’d check if you’re using outputs from the same action in the ‘From’ field and then in the ‘Map’ fields while adding the ‘From’ first and the ‘Map’ later. I can imagine it’d add loop if the dynamic contents came from different actions.

      Reply
  5. Nico says:
    March 3, 2023 at 4:20 pm

    Hello Tom,

    this is almost exactly what I’m looking for, thank you!

    We run a daily flow where we select multiple items that contain the value “Receipt” but can also contain other values.
    After sending a mail containing item information, we want to remove only the value “Receipt” from these items but want to keep the other values.

    Do you know a way how we can do this?

    Reply
    1. Tom says:
      March 19, 2023 at 3:26 pm

      Hello Nico,
      you can add another select where you’ll remap all the other values to their properties, but skip the “Receipt”.

      Reply
  6. Kevin says:
    April 4, 2023 at 4:50 pm

    Great info Tom! This has gotten me so much closer to what I am trying to achieve. I’m only left now with how to select a single matching value for a specific key. My data looks like this:
    body {
    “odatatag”: “some string”,
    “value”: [
    {
    “object name”: “name 1”,
    “object property”: “property 1”
    },
    {
    “object name”: “name 2”,
    “object property”: “property 2”
    }
    With this data I’m trying to get the object name where “object property” equals “property 2”.
    In my scenario I won’t know the number of objects in the array beforehand so using index doesn’t really help. I also don’t know if any of the objects will have a matching property. But if any of them have property 2 I know it will only be one of them. This means no need for looping or apply to each. Any idea how to accomplish this with simple select or expression?

    I’ve tried outputs(‘array_of_objects’)?[body/value]?[‘object property’]?[‘property 2’] but I only get error message that object property cannot be selected, only index can be selected for array. TIA

    Reply
    1. Tom says:
      April 20, 2023 at 9:48 pm

      Hello Kevin,
      use the ‘Filter array’ action first where you enter the ‘value’ as the input and search for objects where ‘object property’ is equal to ‘property 2’. Using the output in the ‘Select’ action will give you the desired value from that object.

      Reply
  7. Hakeem says:
    May 1, 2023 at 10:26 pm

    Hi Team,
    By doing HTTP Call i got the 0365 Usage mailbox details of all the users in JSON format. But i only want to select the 15 users from that list. Can you please suggest how can we filter only about 15 mailbox details from a list of array objects.

    Reply
    1. Tom says:
      May 21, 2023 at 5:26 pm

      Hello Hakeem,
      if it’s an array you can use a composed filter in the ‘Filter array’ action, in your case it might be or(…) with 15 different equals(…) expressions: https://tomriha.com/how-to-apply-multiple-conditions-in-the-filter-array-power-automate-action/

      Reply
  8. Christy says:
    July 11, 2023 at 8:28 pm

    Hi Tom, This is awesome. Just signed up for your newsletter.

    I’m very, very new to Power Automate. This may be a ridiculous question, but I’ve not been able to find a solution. With your thorough and easy-to-understand posts, I’m hoping you can help.

    I’ve set up an “Update when item is created or modified” flow to copy several columns from SP List A to List B; however, when the List A Person column features multiple users/values, the flow creates a separate item on List B for each user that Person column is set to Inputs for Array Item. When I switch it to “Input Entire Array”, nothing transfers over.

    Any guidance you can offer is greatly appreciated.

    Reply
    1. Tom says:
      August 13, 2023 at 3:17 pm

      Hello Christy,
      take a look on this article that explains how to copy multiple people picker columns: https://tomriha.com/how-to-update-multiple-people-or-group-column-in-power-automate/

      Reply
  9. saisupriyakadiyala says:
    July 19, 2023 at 4:27 pm

    this is very helpful
    Thank you

    Reply
  10. Mel says:
    September 19, 2023 at 7:43 pm

    Hi Tom, thanks for posting this it’s really well explained.
    I’ve been able able to follow along (starting from the output of a SharePoint Get Files (properties only) and use a compose action to successfully return the the file Identifier of the first item in the array. However, when I then try to use the Identifier in a SharePoint Move File action I get an error telling me that the response is not in JSON format. The problem does seem to be the File Identifier, as I also tested it with a simple Get File Content step, and that also errored. I’m wondering if perhaps the format of the value that I created in the compose step is not quite right? Any thoughts would be much appreciated.

    Reply
    1. Tom says:
      October 22, 2023 at 3:29 pm

      Hello Mel,
      I’d add a ‘Compose’ action to check the extracted value – just add ‘Compose’ and put the expression inside, you’ll see in the flow run history what you got. At the same time, try to manually select some file to move and check that action in the run history too – you’ll see 1. what you enter in the Move file and 2. if it has the same format as the manually selected file. With files there can be an issue as some actions ask for file ID (number) and some for file identifier (path to the file).

      Reply
  11. Steve Morley says:
    December 12, 2023 at 2:53 pm

    Hi Tom, I really appreciate all you do for everyone. I’m a little stuck and have been looking at some of your posts like this and your other one.
    https://tomriha.com/how-to-update-multiple-people-or-group-column-in-power-automate/

    I have a recurring flow for a SharePoint document library, where I want to extract the reviewer if the status is “Published” and the review date is today.

    The reviewer email address is what I want for each file. When I try the select action, I get this error: he execution of template action ‘Apply_to_each_4’ failed: the result of the evaluation of ‘foreach’ expression ‘@items(‘Apply_to_each_2′)’ is of type ‘Object’. The result must be a valid array.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

πŸš€ Master Power Automate

Join 2,100+ professionals getting actionable Power Automate tutorials, solutions, cheat sheets & tips every week.

No spam. Unsubscribe anytime.

Still exchanging emails to get things approved?

Get the Approval Process solution to skip the hard part and deploy an automated, fully functional approval solution on a SharePoint list in minutes! And then the next one, and the next one...

Approval Template Preview ✨ Learn more ✨

Are your approvals stuck due to unavailable approvers?

Keep your approvals running with the Approval task delegation app! Reassign any existing approval task to another user with a single click - no more waiting for absent approvers!

Power Automate approval task delegation ✨ Learn more ✨

Turn ideas into flows with ease!

Grab the complete Power Automate Cheat Sheet Bundleβ€”everything you need to master expressions, SharePoint HTTP calls, and Graph API in Power Automate.

Cheat Sheet Bundle Preview ✨ Get the Cheat Sheets

Didn't find what you were looking for?
Need to adjust a solution to fit your needs?
Or would you just like to get an assistance from somebody with thousands of hours of experience with Power Automate?

Power Automate blogs worth visiting

Damien Bird
Dennis (Expiscornovus)
Paul Murana

©2025 Let's POWER Automate | Theme by SuperbThemes