Retrieve whole Data Table via Data Action

Hello
I use Data Action and retrieve the whole content of and Data Table: /api/v2/flows/datatables/e730966b-cfa5-4f74-846b-929984369f33/rows/?showbrief=false

This is the config in Response:
{
"translationMap": {},
"translationMapDefaults": {},
"successTemplate": "{"ROW" : "$esc.jsonString(${rawResult})"}"
}

I then get this output:
{ "entities" : [ { "Word" : "Terminate", "Word_1" : "Krypto", "key" : "1" }, { "Word" : "Terminate", "Word_1" : "Spam", "key" : "3" } ], "pageSize" : 25, "pageNumber" : 1, "total" : 2, "pageCount" : 1}

What is the best way to get the key=word_1 from this structure in archtiect? Would like to make a lot the loop through all the values of word_1 one by one

I think that this is what you are looking for. This will return a "Values" variable that is a list of strings.

{
  "translationMap": {"Values" : "entities[*].Word_1"},
  "translationMapDefaults": {},
  "successTemplate": "{\"Values\" : ${Values}}"
}

--Jason

Thanks. Then I get this into architect:
{ "entities" : [ { "key" : "Spam" }, { "key" : "Virus" } ], "pageSize" : 25, "pageNumber" : 1, "total" : 2, "pageCount": 1}

In architect I try to get the key/value pair key out one by one. What is the best function to do that? I have tried different syntax of this function
ToString(GetJsonObjectProperty(GetJsonObjectProperty(Flow.JsonWords,"entities"),"key")[0])

Flow.JsonWords is Json structure

If you use the approach I gave you above you should only have an output of "Values" that will be an list of strings, no need for any JSON processing.

Thanks for the answers. It solved my problem

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.