text: Q:
  
  mysql Extract json element from array
  
  I need to extract JSON element by index e.g.
  SELECT JSON_EXTRACT('[{"featureId":"a","read":1,"write":1,"delete":1},{"featureId":"2","read":1,"write":0,"delete":1}]', '$[0].*');
  
  But it just extracts the values I want extracted part to be like this:
  {
      "featureId": "a",
      "read": 1,
      "write": 1,
      "delete": 1
  }
  
  A:
  
  Try:
  SELECT JSON_EXTRACT('
    [
      {"featureId":"a","read":1,"write":1,"delete":1},
      {"featureId":"2","read":1,"write":0,"delete":1}
    ]
  ', '$[0]');
  
  See db-fiddle.
  
  