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 / Extract a value from m...
Power Automate
Answered

Extract a value from my array

(1) ShareShare
ReportReport
Posted on by 49 Season of Giving Solutions 2025
Hello,
 
I have an array variable that holds values like the below.
 
How do I extract the 'rate' value from the object that holds it and stick it in a variable? I need to update a row in dataverse with this rate of 250.
 
I have tried to filter the array but receiving this error: 
InvalidTemplate. The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@not(equals(item()?['Rate'], 'null'))' failed: 'The template language expression 'not(equals(item()?['Rate'], 'null'))' cannot be evaluated because property 'Rate' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.
 
[
  [
    {
      "MeetingAttendanceApprovedDate""2026-02-23T15:05:19Z",
      "Honorariaruleid""c180a738-854a-f011-877b-002248c8af60",
      "ContactId""3ca179f8-e439-ef11-a316-6045bd0c869e",
      "RuleName""Minimum Attendance",
      "IsQualified"true
    },
    {
      "MeetingAttendanceApprovedDate""2026-02-23T15:05:19Z",
      "Honorariaruleid""ad662566-854a-f011-877b-002248c8af60",
      "ContactId""3ca179f8-e439-ef11-a316-6045bd0c869e",
      "RuleName""Standard Meeting - threshold of 24 meeting is met",
      "IsQualified"true,
      "Rate"250
    },
    {
      "MeetingAttendanceApprovedDate""2026-02-23T15:05:19Z",
      "Honorariaruleid""cfc4e1d0-854a-f011-877b-002248c8af60",
      "ContactId""3ca179f8-e439-ef11-a316-6045bd0c869e",
      "RuleName""contact is current member",
      "IsQualified"true
    }
  ]
]
Categories:
I have the same question (0)
  • Verified answer
    rzaneti Profile Picture
    4,476 Super User 2026 Season 1 on at
     
    Instead of using Rate eq null, change the filter query to test if the object contains the Rate key. Here is an example:
     
    From - your array
    Left side Filter Query input - item() expression, which references the current object.
     
    This is my output, after executing the action:
     
     
    Note: since you're working with a 2-dimensions array (an array nested in another array), you may need to handle this logic before filtering. In my case, I handled it through an expression inside the From input, using the [0] to access the first element of the external array:
     
     
     
    And here I'm sharing some blogs that I wrote about these topics, which can be helpful to you or to other users who find this thread in the future:
    - Using loops and accessing array elements in Power Automate: https://digitalmill.net/2023/07/12/using-loops-and-accessing-array-elements-in-power-automate/
     
    Let me know if it works for you or if you need any additional help!
     
    If this solved your issue, please mark it as Accepted Answer.
    👍 If it helped, feel free to give it a like!

    🌐 Explore more Power Platform content on my Website or on my ▶️ YouTube
    💼 Find me on LinkedIn
     
     
     
  • hpayne1993 Profile Picture
    49 Season of Giving Solutions 2025 on at
     
    Thanks for the reply! 
     
    Where am I going wrong here as the body returns as null
     
     
  • Suggested answer
    Haque Profile Picture
    3,653 on at
     
    Let's know the object of array first, to me it seems in every object of the array doesn't contain the "Rate" attribute. More specifically, in your given array object, the first object is missing " "Rate", the second one contains  "Rate"250 and the third object is missing  "Rate".
     
    The template is not unique for all objects in the array, means the attribute varies on demand. I am saying this based on the three object I see in the array.
     
    Let's polish the filter bit differently, modify the filter expression with the following one.
     
    first(
        filter(
            variables('Honoriaria Array'),
            item()?['Rate']
        )
    )?['Rate']
    
     
     
    If you want to be more protective, in the advance expression mode you can use the following:
     
    and(
      contains(string(item()), 'Rate'),
      not(empty(item()?['Rate']))
    )
    
     
     
    Just forgot to mention:
     
    The error you see because the Filter array action in Power Automate expects you to reference properties that exist on every item in the array. If some objects don't have the Rate property, directly accessing item()?['Rate'] causes the error.
     
    Please let me know if this works.
     
  • Suggested answer
    rzaneti Profile Picture
    4,476 Super User 2026 Season 1 on at
     
    This is happening because Filter array is accessing only the external layer of your variable. This is a 2-dimension array (an array inside another array), as you can see from the square brackets highlighted below:
     
    You are filtering the yellow one, instead of the green one, where your data lives. To solve this problem, just use an expression to reference the first element of your Honoraria Array variable, which may look like this: variables('Honoraria_Array')[0]
     
    Let me know if it works for you or if you need any additional help!
     
    If this solved your issue, please mark it as Accepted Answer.
    👍 If it helped, feel free to give it a like!

    🌐 Explore more Power Platform content on my Website or on my ▶️ YouTube
    💼 Find me on LinkedIn
  • hpayne1993 Profile Picture
    49 Season of Giving Solutions 2025 on at
     Ah that's it! I have removed the extra brackets and it is working now. Thank you so much for your help

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard