my schema :
create table blog (
id SERIAL PRIMARY KEY,
title varchar,
tags jsonb
);
my query:
const tags = "horr";
const query = `SELECT * FROM blog where tags like '%${tags}%'`;
what I am want:
now I am want to get only "tags" column include "horror". but I wanna use just "horr"
I know this query is not work. but wanna do like this bellow
"rows": [
{
"id": 1,
"title": "horror stroy",
"tags": [
"sad",
"horror"
]
}
]