Reply To: JSON Schema for Data Events

  • Scott Anderson

    Member
    May 2, 2024 at 1:51 pm
    Up
    0
    Down
    ::

    I was able to find a reasonably good way to translate the monster JSON dataset sent by the event into a manageable dataset for use in Logic Apps or Power Automate. I accomplished this using the Transform JSON to JSON action in logic apps and using the following DotLiquid template to do the transformation. This will pluck the resulting data table record from the event and return a JSON object with all of the columns in the table. The template is suitable for any table since it Dynamically gets the column names.

    {

    {%- assign inputparameters = content.InputParameters -%}

    {%- for target in inputparameters -%}

    {%- if target.Key == “Target” -%}

    {%- for attribute in target.Value.Attributes -%}

    {%- if forloop.Last == true -%}

    “{{attribute.Key}}”:”{{attribute.Value}}”

    {%- else -%}

    “{{attribute.Key}}”:”{{attribute.Value}}”,

    {%- endif -%}

    {%- endfor -%}

    {%- endif -%}

    {%- endfor -%}

    }

Welcome to our new site!

Here you will find a wealth of information created for people  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!