Searching and Modifying JSON Values Path syntax uses a leading  $  character to represent the JSON document under consideration, optionally followed by selectors that indicate successively more specific parts of the document: last  is supported as a synonym for the index of the rightmost array element. Relative addressing of array elements is also supported. If  path  does not select an array value,  path [last] evaluates to the same value as  path , as shown later in this section (see Rightmost array element). Let  $  refer to this JSON array with three elements: Because  $[1]  and  $[2]  evaluate to nonscalar values, they can be used as the basis for more-specific path expressions that select nested values. Examples: 2076 • $[1].b  evaluates to  10 . • $[1].a[1]  evaluates to  6 . • $[1].a  evaluates to  [5, 6] . • $[3]  evaluates to  NULL  (it refers to the fourth array element, which does not exist). • $[2]  evaluates to  [99, 100] . • $[1]  evaluates to  {"a": [5, 6], "b": 10} . • $[0]  evaluates to  3 . • prefix ** suffix  evaluates to all paths that begin with the named prefix and end with the named suffix. •A path that does not exist in the document (evaluates to nonexistent data) evaluates to  NULL . • [*]  evaluates to the values of all elements in a JSON array. • .[*]  evaluates to the values of all members in a JSON object. •Paths can contain  *  or  **  wildcards: • [ M  to  N ]  specifies a subset or range of array values starting with the value at position  M , and ending with the value at position  N . • [ N ]  appended to a  path  that selects an array names the value at position  N  within the array. Array positions are integers beginning with zero. If  path  does not select an array value,  path [0] evaluates to the same value as  path : •A period followed by a key name names the member in an object with the given key. The key name must be specified within double quotation marks if the name without quotes is not legal within path expressions (for example, if it contains a space). mysql>  SELECT JSON_SET(’"x"’, ’$[0]’, ’a’); +------------------------------+ | JSON_SET(’"x"’, ’$[0]’, ’a’) | +------------------------------+ | "a" | +------------------------------+ 1 row in set (0.00 sec) [3, {"a": [5, 6], "b": 10}, [99, 100]] Then: