Querying an array containing semi-structured objects

QUESTION :question:
If my data have an array containing semi-structured objects, is there a way to SELECT only particular elements from that array depending on what properties they contain?

For example, I have an array of components. Each one can have a different key and then different unstructured data under the “value” property. Basically, I need to find out if I can construct SQL queries on this data by selecting certain values from the components array based on the component keys. See below for what the semi-structured data looks like as an example:

ferroRecord =  {
     "_id":"ferro-id",
      "name": "ferro",
      "components": [
  {
      "key":"pizza1",
       "value":
       {
          "value1": "cheese",
          "value2" : "pineapples"
        }
  },
       {
         "key":"pizza2",
         "value":
       {
          "value3": "buratta",
          "value2" : "sausage"
        }
     }
  ]
}

:white_check_mark:ANSWER

At query time, you can use the UNNEST command which is used as:

SELECT components.value.value2
FROM commons.YOURCOLLECTION as c, 
UNNEST(c.components) AS  components 
WHERE components.key = 'pizza1'