I have a json in the below format in a table in column item_details and I am trying to get the rows with category = drawing-room. I have tried the below approach but getting null in result. Requesting to please suggest. Thanks!
JSON
"discount": [
{
"target": {
"item": [
{
"category": "drawing-room",
SQL Query
select object
from DATA, JSON(item_details->>'discount') as object
where (object->>'discount[0].target.item[0].category'='drawing-room');