cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
liko
Level: Power Up

Extract value from JSON Array without using Apply To Each

Hello everyone, 

 

I have a JSON that has the following format:

 

{
  "value": [
    {
     "title": "Title 1",
      "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3",
    },
    {
      "title": "Title 2",
      "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3-1",
    },
    {
      "title": "Title 3",
      "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3-2",
    }
  ]
}

 

I used Data Operations - Select to extract the ID fields  and now I have the following format:

 

[
  {
    "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3"
  },
  {
    "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3-1"
  },
  {
    "ID": "9ee4ee0d-388a-4c87-8ff0-b2584eac42e3-2"
  }
]

 

I want to extract the values of all the IDs and return them as a string.

I have already managed to do so, using 'Variables-Initialize Variable', 'Aply To Each' and 'Variables-Append to string Variable'.  I am looking for a solution where I don't have to use the 'Apply To Each' ,as this operation takes a fews seconds to complete and the latency increases with increasing number of items (in the case above only 3). Does anyone know how to return all the IDs as a string without the use of Apply To Each?

 

Any kind of help or input is appreciated. Thank you in advance! 

1 REPLY 1
Community Support Team
Community Support Team

Re: Extract value from JSON Array without using Apply To Each

Hi @liko,

 

Per my certain research and test, I am afraid that it might be not possible to extract all the IDs and set them as a string without using Apply to each.

 

There is another customer request the same feature on join function, please see it at here:

https://powerusers.microsoft.com/t5/Flow-Ideas/Data-Operations-Join-don-t-need-Apply-to-each-flow/id...

 

Please vote and comment the idea at here. I will keep an eye on this issue to see if there are other available methods.

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 186 members 5,361 guests
Please welcome our newest community members: