Trying to get the following data into a ui_table node?

Trying to get the following data into a ui_table node?

"{"temperature_C":28.32,"humidity":27.582653862395023,"pressure_hPa":1002.5767212626166,"model":"BME280","heatIndex":27.222709256127676,"dewPoint_C":7.849362883699638,"altitude_M":89.19137469366625,"temperature_F":82.976,"pressure_Hg":29.606078056701822}"

But I am not sure what format the ui_table node expects? There data looks to me, to be a JSON string, representing just one row of data.

When I convert it from a JSON string to a Java object, it seems to be the expected format for ui_table input, but I get an empty table. I also created a column per data element, but that did not seem to work either.

This can't be that difficult can it?

It expects an array of objects.

Each element of the array is one row of your table. The automatic column generation of the underline library will define the columns for you.

Just add a change node (below config will do the trick) after the the JSON node to make it work.

r-01

Wow! Wonderful, that turned out to be quite easy.. I am surprised again just how powerful the change node is at times! I was googling for ideas how to solve it, and thought it might take some coding to resolve. Thanks!

1 Like

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