
Announcements
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
Hi @Kohsel ,
I'm working on the exact same task, and have reach the same challenge!
Did you ever manage to find a solution?