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

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter Array not retur...
Power Automate
Answered

Filter Array not returning values

(0) ShareShare
ReportReport
Posted on by 174

Hello, 

I am trying to retrieve ID values from a JSON output (target system) that has multiple objects and compare it with SQL data (source) with an ID column, then update the target system if both source and target ID match. I was successful in doing this update when I had only one object in the JSON output, but now that I have multiple objects in the output, how can I retrieve the ID of each object and compare it with the SQL ID? 

I tried moving the filter array to apply to each, but the output is coming in as blank. What is the best way to achieve this? Thank you in advance! 

godala_vamshi_0-1717626479280.pnggodala_vamshi_1-1717626976335.png

sample JSON output :  [ {
"workspaceId": "21b184a3-f-dcf7fb6c792d",
"globalId": "21b184a3-5411-4db6c792d:112523",
"id": "112523",
"objectTypeAttributeId": "124",
"objectAttributeValues": [
{
"value": "2024-06-05T20:24:58.299Z",
"displayValue": "05/Jun/24 8:24 PM",
"searchValue": "2024-06-05T20:24:58.299Z",
"referencedType": false
}
],
"objectId": "1834"
},
{
"workspaceId": "21b184a3-4d4c-a9af-dcf7fb6c792d",
"globalId": "21b184a3-5411-7fb6c792d:112529",
"id": "112529",
"objectTypeAttributeId": "926",
"objectAttributeValues": [
{
"value": "65",
"displayValue": "65",
"searchValue": "65",
"referencedType": false
}
],
"objectId": "1834"
}
],
"_links": {
"self": "https://api.atlassian.com/"
},
"name": "eStatement"
}
],
{
"workspaceId": "21b184a3-541-dcf7fb6c792d",
"globalId": "21b184a3-5411-4d4c2507",
"id": "112507",
"objectTypeAttributeId": "124",
"objectAttributeValues": [
{
"value": "2024-05-09T23:02:51.620Z",
"displayValue": "09/May/24 11:02 PM",
"searchValue": "2024-05-09T23:02:51.620Z",
"referencedType": false
}
],
"objectId": "1833"
},
{
"workspaceId": "21b184a3-5411-4d4c-a9af-dcf7fb6c792d",
"globalId": "21b184a3-5411-4d4c-a9af-dcf7fb6c792d:112513",
"id": "112513",
"objectTypeAttributeId": "926",
"objectAttributeValues": [
{
"value": "85",
"displayValue": "85",
"searchValue": "85",
"referencedType": false
}
],
"objectId": "1833"
}
],
"_links": {
"self": "https://api.atlassian.com/"
},
"name": "FIS - Direct Branch (Branch Capture)"
}
]

Categories:
I have the same question (0)
  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @godala_vamshi 

     

    One thing to confirm- does the JSON output you have shared is what present in var variable or it is output of single http request response ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • godala_vamshi Profile Picture
    174 on at

    Hi @Nived_Nambiar Yes, I'm setting http response in the var, In current case I only received two records in JSON response but it will change every time. attached the full JSON below.  Thank you!

    godala_vamshi_0-1717643572217.png

     

     

     

     

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @godala_vamshi 

     

    The flow design which you used here is incorrect/wrong as there was no need to loops again and this seems to have done with single loop itself. One more question i have which i forget to ask earlier- in filter array you have used filter condition to filter based on 926 value, would that be static always or would it each change based on each row from database table ?

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • godala_vamshi Profile Picture
    174 on at

    @Nived_Nambiar Even though I remove another apply to each, Filter array output coming as blank when I have more than 1 records. 926 is the ID of the field that I'm retrieving its value and setting in AppID compose action and then comparing it with SQL ID.  

    One thing I notice with JSON output, JSON is starting with below code when I have more then 1 records, not sure if I need to make any changes on the Filter array step. 
    [{"objectEntries":

     

    godala_vamshi_0-1717692837567.png

    Thanks again! 

  • Nived_Nambiar Profile Picture
    18,136 Super User 2026 Season 1 on at

    Hi @godala_vamshi 

     

    Yes seems like json structure is different > see whether this helps ?

     

    variables('var')?['objectEntries']?[0]?['attributes']

     

    Instead of itertaing over variable var, iterate over above expression 

     

    Thanks & Regards,

    Nived N 🚀

    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs

    🔍 Found my answer helpful? Please consider marking it as the solution!
    Your appreciation keeps me motivated. Thank you! 🙌

     

  • godala_vamshi Profile Picture
    174 on at

    @Nived_Nambiar If your saying to replace From value with your expression instead of var, I tried that but getting below error. 

    godala_vamshi_0-1717706207567.png

    godala_vamshi_1-1717706347460.png

     

  • godala_vamshi Profile Picture
    174 on at

    @Nived_Nambiar I have made a minor change to the expression(variables('var')?[0]?['objectEntries']?[0]?['attributes']) you provided, now it is getting ID of one record from JSON output which actually has 2 records. I'm not sure how I can loop it to get ID of each record and then use that each ID to update the target. Thanks again for your help! 

    godala_vamshi_0-1717804416645.png

     

  • Verified answer
    abm abm Profile Picture
    32,979 Most Valuable Professional on at

    Hi @godala_vamshi 

     

    Thanks for the screenshare. Here you have multiple array within each objects. So Iterate each array using Parse JSON then map the values in a compose. Then find the schema of the next array and use parse json to iterate it.

     

     

    image.png

     

    Hope the screenshare was useful.

     

    @Nived_Nambiar  thanks for the contribution.

    Thanks

  • godala_vamshi Profile Picture
    174 on at

    @Nived_Nambiar  @abm Thank you both! really appreciate it. 

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
trice602 Profile Picture

trice602 239 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 177 Super User 2026 Season 1

#3
Kalathiya Profile Picture

Kalathiya 97 Super User 2026 Season 1

Last 30 days Overall leaderboard