cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JoshPayneSays
Frequent Visitor

Append Property to the JSON

Hi I would like to add an addation property to a JSON output using flow.

 

The JSON input looks like this:

 

{
  "success": true,
  "timestamp": 1619976843,
  "base": "EUR",
  "date": "2021-05-02",
  "rates": {
    "EUR": 1,
    "GBP": 0.869971,
    "USD": 1.201995,
    "CNY": 7.782318,
    "JPY": 131.378652
  }
}

 

The JSON output I need should look like:

{
  "success": true,
  "timestamp": 1619976843,
  "base": "EUR",
  "date": "2021-05-02",
  "url": "http://api.exchangeratesapi.io/",
  "rates": {
    "EUR": 1,
    "GBP": 0.869971,
    "USD": 1.201995,
    "CNY": 7.782318,
    "JPY": 131.378652
  }
}

 

I have tried using the Compose  >  Select action as below, however I recieve the  following error message:

 

The 'from' property value in the 'select' action inputs is of type 'Object'. The value must be an array.

 

ScrSht_err_PwrFlw_append-JSON_01.PNGScrSht_err_PwrFlw_append-JSON_02.PNG

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
CFernandes
Super User
Super User

Hey @JoshPayneSays 

 

Use the Addproperty method -

 

addProperty(outputs('Compose_2'), 'url', 'http://api.exchangeratesapi.io/')
 
CFernandes_0-1619982394724.png

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

View solution in original post

Thank you @CFernandes ,

 

This worked perfectly. You super sta, much appreciated buddy.

 

For anyone who is interested, see below my full Flow, which creates a currency lookup list for users, utilising a SharePoint list as the frontend.

 

ScrSht_err_PwrFlw_append-JSON_04.PNG

View solution in original post

3 REPLIES 3
CFernandes
Super User
Super User

Hey @JoshPayneSays 

 

Use the Addproperty method -

 

addProperty(outputs('Compose_2'), 'url', 'http://api.exchangeratesapi.io/')
 
CFernandes_0-1619982394724.png

 

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Thank you @CFernandes ,

 

This worked perfectly. You super sta, much appreciated buddy.

 

For anyone who is interested, see below my full Flow, which creates a currency lookup list for users, utilising a SharePoint list as the frontend.

 

ScrSht_err_PwrFlw_append-JSON_04.PNG

Hey Mate @JoshPayneSays 

 

Thank you for you kind words. It really help me stay motivated.

 

Thank you for Sharing your Solution with the community. I am sure if someone else stumbles over the same problem they will find the post helpful.

 

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,661)