Step: Wildcard: [*]

Wildcard: [*]

The wildcard [*] (or its shorthand .*) matches every element of an array or every value of an object, regardless of key or index.

For example $.pets[*].name returns the name of every pet in the pets array, no matter how many there are.

Now write an expression that returns the name of every pet below.

Input:
{
  "pets": [
    {
      "name": "Bear",
      "kind": "dog",
      "age": 3
    },
    {
      "name": "Jerry",
      "kind": "cat",
      "age": 5
    },
    {
      "name": "Rex",
      "kind": "dog",
      "age": 7
    }
  ]
}
Expected:
[
  "Bear",
  "Jerry",
  "Rex"
]
Step 8 of 9