Populating Table with JSON array shows square brackets

Hi there, for some reason I cannot figure out how to populate a table with a JSON array. It renders with the square brackets still in place in a table. However, rendering the same data in a text area shows the values correctly.

Should I JSON parse the query data in the table?

Thank you!

Hey @johnHemlane!

This seems odd :thinking: from what you're showing I'd expect your data to display properly. Would you mind sharing screenshots of your table settings as well as what your data looks like expanded in the left panel?

I'm particularly curious about what your column settings are but imagine the cause could lie in a number of different places.

Thank you @Kabirdas !

Table Settings:
Interestingly enough I can get it to work if updating each column to use the value of {{ self[0] }}

The Data:

Hey @johnHemlane!

Can you try passing {{query68.data.map(row => _.mapValues(row, _.head))}} to your table?

That should extract all the values from their respective arrays, the lodash documentation has more info on _.mapValues and _.head!

1 Like

Thank you so much! That worked perfectly.