cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
guest1234
New Member

Transpose JSON

Hello,

I need to transpose JSON which has been returned like this:

 

[
  {
    "Year": 2019,
    "Amount": 0
  },
  {
    "Year": 2020,
    "Amount": 15000
  },
  {
    "Year": 2021,
    "Amount": 10000
  },
  {
    "Year": 2022,
    "Amount": 5000
  },
  {
    "Year": 2023,
    "Amount": 0
  }
]

 

To this:

 

  {
	"2019": 0,
	"2020": 15000,
	"2021": 10000,
	"2022": 5000,
	"2023": 0
  }

 

Is there a way to do that in Power Automate?

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @guest1234 ,

 

Unfortunately, currently, there is no similar action or expression in Power Automate that supports such a data operation.

 

You can use Parse JSON to extract the required attributes or filter items:

http://johnliu.net/blog/2018/6/a-thesis-on-the-parse-json-action-in-microsoft-flow

 

Best Regards,

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

View solution in original post

2 REPLIES 2
ChristianAbata
Super User II
Super User II

oh @guest1234  unfortunally like an expression to do this  no friend. You can try by splitfing your json and then getting one by one the data you need.



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA
v-bacao-msft
Community Support
Community Support

 

Hi @guest1234 ,

 

Unfortunately, currently, there is no similar action or expression in Power Automate that supports such a data operation.

 

You can use Parse JSON to extract the required attributes or filter items:

http://johnliu.net/blog/2018/6/a-thesis-on-the-parse-json-action-in-microsoft-flow

 

Best Regards,

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

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (1,271)