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

 

1 ACCEPTED SOLUTION

Accepted Solutions
CFernandes
Super User III
Super User III

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

3 REPLIES 3
CFernandes
Super User III
Super User III

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

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
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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (925)