cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
guest1234
Regular Visitor

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
Super User

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.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,502)