Sample Header Ad - 728x90

Query nested json columns in postgresql

0 votes
2 answers
290 views
I want to return Germany and UK from the below json column/string.
{
 "id": 1,
  "name": "phone",
  "components": [
    {
      "id": 1,
      "type": "screen",
      "manufacturers": [
       {
         "id": 1,
          "name": "a",
          "country": "Germany"
        }
      ]
   },
   {
     "id": 2,
      "type": "keyboard",
      "manufacturers": [
        {
         "id": 1,
          "name": "a",
          "country": "UK"
        }
     ]
   }
  ]
}
Asked by Jackie Ndinwa (1 rep)
Jun 4, 2024, 09:13 AM
Last activity: May 26, 2025, 09:04 AM