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 Automate / How to convert key val...
Power Automate
Unanswered

How to convert key value pairs?

(0) ShareShare
ReportReport
Posted on by

Hello

 

I am working on a flow that uses SharePoint search to find sites that are attached to a specific Hub site. The search result returns a json body like this:

 

 "RelevantResults": {
 "GroupTemplateId": null,
 "ItemTemplateId": null,
 "Properties": [
 {
 "Key": "GenerationId",
 "Value": "9223372036854775806",
 "ValueType": "Edm.Int64"
 },
 {
 "Key": "indexSystem",
 "Value": "",
 "ValueType": "Edm.String"
 },
 {
 "Key": "ExecutionTimeMs",
 "Value": "47",
 "ValueType": "Edm.Int32"
 },
 {
 "Key": "QueryModification",
 "Value": "contentclass=sts_site departmentid={f357c357-68c0-428e-b2d2-42fb4d1fe1b4} -ContentClass=urn:content-class:SPSPeople",
 "ValueType": "Edm.String"
 },
 {
 "Key": "RenderTemplateId",
 "Value": "~sitecollection/_catalogs/masterpage/Display Templates/Search/Group_Default.js",
 "ValueType": "Edm.String"
 },
 {
 "Key": "StartRecord",
 "Value": "0",
 "ValueType": "Edm.Int32"
 },
 {
 "Key": "IsLastBlockInSubstrate",
 "Value": "true",
 "ValueType": "Edm.Boolean"
 },
 {
 "Key": "IsFirstBlockInSubstrate",
 "Value": "false",
 "ValueType": "Edm.Boolean"
 },
 {
 "Key": "IsFirstPinnedResultBlock",
 "Value": "false",
 "ValueType": "Edm.Boolean"
 },
 {
 "Key": "IsLastPinnedResultBlock",
 "Value": "false",
 "ValueType": "Edm.Boolean"
 },
 {
 "Key": "IsFirstRankedResultBlock",
 "Value": "true",
 "ValueType": "Edm.Boolean"
 },
 {
 "Key": "IsLastRankedResultBlock",
 "Value": "true",
 "ValueType": "Edm.Boolean"
 },
 {
 "Key": "MixedTableOrder",
 "Value": "0",
 "ValueType": "Edm.Int32"
 },
 {
 "Key": "GeoLocationSource",
 "Value": "EUR",
 "ValueType": "Edm.String"
 },
 {
 "Key": "piPageImpressionBlockType",
 "Value": "2",
 "ValueType": "Edm.Int32"
 }
 ],
 "ResultTitle": null,
 "ResultTitleUrl": null,
 "RowCount": 2,
 "Table": {
 "Rows": [
 {
 "Cells": [
 {
 "Key": "Rank",
 "Value": "-8.1690301",
 "ValueType": "Edm.Double"
 },
 {
 "Key": "DocId",
 "Value": "650610271225535901",
 "ValueType": "Edm.Int64"
 },
 {
 "Key": "departmentid",
 "Value": "{f357c357-68c0-428e-b2d2-42fb4d1fe1b4}",
 "ValueType": "Edm.String"
 },
 {
 "Key": "siteid",
 "Value": "3d003b73-28f3-4c0d-9144-d14341a7df30",
 "ValueType": "Edm.String"
 },
 {
 "Key": "Title",
 "Value": "Vendor A | Siemens Gamesa - As Built",
 "ValueType": "Edm.String"
 },
 {
 "Key": "SiteName",
 "Value": "https://delfinen2.sharepoint.com/sites/vendora",
 "ValueType": "Edm.String"
 },

 

 I am struggling with extracting this format to a format like this:

 

{
	"result" : [
		{
			"Title" 	: "AsBuiltHub"
			"Url" 		: "https://delfinen2.sharepoint.com/sites/AsBuiltHub"
			"SiteId" 	: "f357c357-68c0-428e-b2d2-42fb4d1fe1b4"
		},
		{
			....
		}
	[		
}

 

How do I extract the key / value pair where the key value equals for instance "Title" ?

Thanks,

Lars Kohsel

Categories:
I have the same question (0)
  • Dave0000 Profile Picture
    2 on at

    Hi @Kohsel ,

     

    I'm working on the exact same task, and have reach the same challenge!

     

    Did you ever manage to find a solution?

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 Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard