web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PVA PowerFx Formula to...
Power Apps
Unanswered

PVA PowerFx Formula to transform table

(0) ShareShare
ReportReport
Posted on by

In Power Virtual Agent, I have a table like the following:

 

 

[
 {
 "Cells": [
 {
 "Key": "FirstName",
 "Value": "Paul"
 },
 {
 "Key": "LastName",
 "Value": "McCartney"
 },
 {
 "Key": "Instrument",
 "Value": "Bass Guitar"
 }
 ]
 },
 {
 "Cells": [
 {
 "Key": "FirstName",
 "Value": "George"
 },
 {
 "Key": "LastName",
 "Value": "Harrison"
 },
 {
 "Key": "Instrument",
 "Value": "Electric Guitar"
 }
 ]
 }
]

 

 

I'm trying to transform this data with a PowerFX Formula into the following:

 

 

[
 {
 "FirstName": "Paul",
 "LastName": "McCartney"
 },
 {
 "FirstName": "George",
 "LastName": "Harrison"
 }
]

 

 

Essentially, I want to loop over each item in the initial array, loop over each Cell, and select the Key and Value, where the value for Key is the name of a property I want to collect (in this example, FirstName and LastName). I've spent the past 2 days trying to get this to work, but am having no luck getting more than one property.

 

Any help would be greatly appreciated.

Categories:
I have the same question (0)
  • hroudaadam Profile Picture
    22 on at

    Hi there!
    You can achive this result by using Ungroup and RenameColumns 🙂

    RenameColumns(Ungroup(varInput,"Cells"), "Key", "FirstName", "Value", "LastName")

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard