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
Community Support
Community Support

Re: JSON data with Column Headers in array

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.
Highlighted
Super User
Super User

Re: JSON data with Column Headers in array

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/

 

 

Administrator
Administrator

Re: JSON data with Column Headers in array

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
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (4,584)