cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mattmagoo
Regular Visitor

JSON data with Column Headers in array

Hi Everyone,

 

I've got my head around doing loops with JSON data in Flow, but I've recently come across some data (from SmartSheet trigger) that has the parameter names stored in an array, and then referenced using UIDs in the rest of the data.

 

I want to put each one of the rows into an Azure Table with the Column titles as the Column titles in Azure, but I can think of a quick way to do it.

 

The number of columns is not always set as I need to allow for additional custom columns.

 

{
  "id": 4314761593677700,
  "name": "Test Sheet",
  "version": 1,
  "totalRowCount": 2,
  "accessLevel": "OWNER",
  "effectiveAttachmentOptions": [
    "DROPBOX",
    "FILE",
    "ONEDRIVE",
    "EVERNOTE",
    "EGNYTE",
    "BOX_COM",
    "GOOGLE_DRIVE"
  ],
  "ganttEnabled": false,
  "dependenciesEnabled": false,
  "resourceManagementEnabled": false,
  "cellImageUploadEnabled": true,
  "userSettings": {
    "criticalPathEnabled": false,
    "displaySummaryTasks": true
  },
  "permalink": "https://app.smartsheet.com/b/home?lx=8omV35QPVpkHIbr5XLdYvw",
  "createdAt": "2018-06-26T18:03:56Z",
  "modifiedAt": "2018-06-26T18:04:52Z",
  "columns": [
    {
      "id": 2550271646689156,
      "index": 0,
      "title": "Primary Column",
      "type": "TEXT_NUMBER",
      "primary": true,
      "validation": false,
      "width": 150
    },
    {
      "id": 7053871274059652,
      "index": 1,
      "title": "Name",
      "type": "TEXT_NUMBER",
      "validation": false,
      "width": 150
    },
    {
      "id": 5927971367217028,
      "index": 2,
      "title": "Data 1",
      "type": "TEXT_NUMBER",
      "validation": false,
      "width": 150
    },
    {
      "id": 1424371739846532,
      "index": 3,
      "title": "Data 2",
      "type": "TEXT_NUMBER",
      "validation": false,
      "width": 150
    },
    {
      "id": 3676171553531780,
      "index": 4,
      "title": "Optional Data",
      "type": "TEXT_NUMBER",
      "validation": false,
      "width": 150
    }
  ],
  "rows": [
    {
      "id": 5818013345703812,
      "rowNumber": 1,
      "expanded": true,
      "createdAt": "2018-06-26T18:04:52Z",
      "modifiedAt": "2018-06-26T18:04:52Z",
      "cells": [
        {
          "columnId": 2550271646689156,
          "value": "ABC",
          "displayValue": "ABC"
        },
        {
          "columnId": 7053871274059652,
          "value": "Sample",
          "displayValue": "Sample"
        },
        {
          "columnId": 5927971367217028,
          "value": 123,
          "displayValue": "123"
        },
        {
          "columnId": 1424371739846532,
          "value": 2,
          "displayValue": "2"
        },
        {
          "columnId": 3676171553531780
        }
      ]
    },
    {
      "id": 3566213532018564,
      "rowNumber": 2,
      "siblingId": 5818013345703812,
      "expanded": true,
      "createdAt": "2018-06-26T18:04:52Z",
      "modifiedAt": "2018-06-26T18:04:52Z",
      "cells": [
        {
          "columnId": 2550271646689156,
          "value": "DEF",
          "displayValue": "DEF"
        },
        {
          "columnId": 7053871274059652,
          "value": "Sample 2",
          "displayValue": "Sample 2"
        },
        {
          "columnId": 5927971367217028,
          "value": "xyz",
          "displayValue": "xyz"
        },
        {
          "columnId": 1424371739846532
        },
        {
          "columnId": 3676171553531780,
          "value": 2,
          "displayValue": "2"
        }
      ]
    }
  ]
}
3 REPLIES 3
v-yamao-msft
Community Support
Community Support

Hi @mattmagoo,

 

Do you want to enter the Title columns into an Azure Table as the Title in Azure?

Do you want to add additional custom columns in the table?

Please share more details on your scenario for better understanding.

 

 

Best regards,

Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @mattmagoo,

 

Try to avoid the loops directly on your json.

 

You should probably look at a combination of the select and compose actions. You could prbbaly even use the varibale connector for the arrays if tht is eomthign that you would prefer.

 

On select please see the following post:

https://veenstra.me.uk/2018/06/04/microsoft-flow-how-to-make-your-flows-perform-better/

 

 

Hello, @mattmagoo!

Have you had an opportunity to apply @Pieter_Veenstra‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution” so that this thread will be marked for other users to easily identify! Thank you for being an active member of the Flow Community!

 

-Gabriel

Flow Community Manager

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager



Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Users online (53,661)