JSON and table handling

Good evening everyone,

I came across a situation that I am not able to adjust according to the need I need at the moment, I did research on the subject on google and right here on the forum.

The point is:
I get data from a select that I do through an item in the database.

The select is this:
SELECT distinct(P.orderid)

tinf_orderlog P


** V.orderid**
** FROM**
** tinf_order_payment V**
** ONDE**
** V.orderid = P.orderid**

This select does searches in a table what is not in the other and returns the records in zabbix as Text, it brings me in json and then I make the following substitutions so that I only have the record.

Records that are separated by ,:

These records come from various hosts.

My difficulty is to make them appear as a table and to be able to filter for these records and from several hosts.

I would like it to stay this way