I'm really new to Postgres and was wondering if there is an easy way to do this. I have a table where I will only query a single row at a time. Every row is about a product and every column is basic nutritional info on the pack which looks like this:

While querying a single row, I want to ignore all the columns that have null values and return the rest in a JSON format. I haven't found a good way to filter the null columns.
I found this is how you convert the data to JSON in Postgres and it works well but because every product (row) will have different nutritional info (column) so I don't how to implement this.
If there is no way to implement this then can I send everything to the frontend and filter it there? Will that affect the performance a lot? I have about 150 columns.