Convert API response JSON to Array to disaply it on table

Hello there!

I am trying to put data from bigquery response API, into a table to create record types. 

So far, I have been able to get the response from bigquery and convert it to appian values, the response looks like this:

This is the response I get from bigquery api

then, I created a rule to narrow down to the values, but as you can see, the column name does not come from the response, so it displays all the values as rows but on the following way :

so as you see, I do not have columns  there , I guess the best way to go on this, will be to get the JSON response converted to an array, and then pass it to a table but not sure if this is possible, any advise?

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Lead Developer
    in reply to rodrigoe0001

    Try these permutations, just in case, and see if either happens to work any better:

    first:

    a!forEach(
      rule!bigQuery().result.body.rows.f,  /* adding ".f" at the end here */
      
      createDictionary(
        {"State", "Country", ...}, /* array of all column/property names */
        fv!item.v
      )
    )

    Second, somewhat more radical:

    a!forEach(
      rule!bigQuery().result.body.rows.f,
      
      createDictionary(
        {"State", "Country", ...}, /* array of all column/property names */
        a!forEach(
          /* create an inner forEach loop, attempt to loop over the inner array of dictionaries containing the "v:" property */
          fv!item,
          fv!item.v
        )
      )
    )

Children