Return a list from connector

I want to load all the results into a list to return, how to achieve this requirement ? thanks

Make sure, you provide a List of objects:

image

Make the Extractor a period:

2 Likes

would be nice if one was not forced to have a top-level object no matter what, but rather the array as such if that was all you were interested in. Right now this is not possible.

{
  "ConnectorResult": {
    "result": [
      {"key": "value"}, ...
    ]
}
// or
{
  "ConnectorResult": {
    "result": ["value1", "value2", ...]
  }
}

Hi @sebme ,
I’m not sure, what exactly you want to do, but you can manipulate the output structure a lot.
Here are four examples for the same Connector Result:

Actual Body:

{
	"SalesOrderID": "123456789",
   ...
	"Items": [
		{
			"Item": "1000",
          ...
		},
		{
			"Item": "1010",
          ...
		},
		{
			"Item": "1011",
          ...
		},
		{
			"Item": "1020",
          ...
		},
		{
			"Item": "1030",
          ...
		},
		{
			"Item": "1040",
          ...
		},
		{
			"Item": "1050",
          ...
		}
	]
}

Sample Outputs:




Is the last one something you where looking for?

1 Like

what about below, how to output values?

1 Like

My point was, and maybe I was not clear enough, that currently it is not possible to just handover the resulting array directly, without the need of an additional object wrapper around it when it is returned from the original connector function. I guess along the lines of what @rui seems to point at as well.

That is exactly what I was referring at this Post

It seems there is no solution for this except fetching each line or column individually :frowning:

@chrniem Your solution works for small numbers of rows, but breaks down for more than 250 rows.because tulip application is limited to a maximum of 250 triggers

1 Like

The issue here is, that you have an Array of Arrays. This structure does not exist in TULIP.

The main question to me would be, what do i want to do with this data in TULIP and how would I handle these data?
You could grab a list of texts, and make them number lists in the App or you could build a note red endpoint to handle this data and maybe make it an object list or so…
(needs a node red server running…)

I guess there is no good out of the box solution for Arrays of Arrays, since this structure is not availabel in TULIP.