discoveryjs/JsonDiscovery

Canot show some JSON inputs as a table

Closed this issue · 2 comments

I'm starting to use this plugin and on my second use case ( https://www.ravenminer.com/api/v1/blocks ) I noticed that it cannot accept the input correctly and show it as a table.
It shows a one cell table with the JSON inside instead of the table of what that JSON contents.

I don't know much about json, but this plugin seems to be very nice and it would be good if it would work correctly with this JSON input.

Cheers.

exdis commented

Hey @CidiRome, it looks that the problem is that when you apply the table view to the data your data looks like:

{
    blocks: [{...}, {...}, ...]
}

And the table view tries to build a table based on this data, so it outputs one column called blocks.

To fix this, you either need to modify the query as I showed in the screenshot below:
Screenshot 2021-12-06 at 15 07 13

Or you need to reconfigure the view so that it accepts an array of blocks as input:
Screenshot 2021-12-06 at 15 12 41

Thank you for the information.
I found that if I click the tooltip "blocks" that appears on when I click the top textarea or write "blocks" in it, I can then see the table.
Nice plugin, very usefull...
image