{"id":11999,"date":"2023-10-31T06:49:15","date_gmt":"2023-10-31T13:49:15","guid":{"rendered":"https:\/\/www.mysqltutorial.org\/?page_id=11999"},"modified":"2023-11-23T05:56:46","modified_gmt":"2023-11-23T12:56:46","slug":"mysql-json-path","status":"publish","type":"page","link":"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/","title":{"rendered":"MySQL JSON Path"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn about MySQL JSON path and how to use it to specify and navigate through elements in a JSON document.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is JSON path?<\/h2>\n\n\n\n<p>JSON path is a way to specify and navigate through the elements in a JSON document. It serves as a roadmap to locate specific pieces of data within a JSON structure. <\/p>\n\n\n\n<p>In MySQL, you can use JSON path expressions to locate elements within a JSON document.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MySQL JSON path syntax elements<\/h2>\n\n\n\n<p>The following outlines the key elements of JSON path syntax:<\/p>\n\n\n\n<p><strong>Scope ($)<\/strong>: The scope represents the JSON document, which serves as its root.<\/p>\n\n\n\n<p><strong>Path Legs<\/strong>: A path may consist of one or more path legs. There are three types of path legs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Member<\/strong>: Using a period (<code>.<\/code>) followed by a key name or asterisk (*). The member is used to access a member of an object.<\/li>\n\n\n\n<li><strong>Array Location<\/strong>: Using square brackets (<code>[]<\/code>) to access <a href=\"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json_array\/\">array<\/a> elements by their indexes (N) or using an asterisk to access all elements in an array.<\/li>\n\n\n\n<li><strong>Double Asterisk (**)<\/strong>: This is a special token that represents a recursive search for all paths within the JSON document.<\/li>\n<\/ul>\n\n\n\n<p><strong>Key names<\/strong>: Key names are enclosed in double quotes or can be valid <code>ECMAScript<\/code> identifiers, specifying the names of keys in a JSON object.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MySQL JSON path examples<\/h2>\n\n\n\n<p>Let&#8217;s explore some examples of using the JSON path expressions to specify elements in a JSON document.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) Accessing a specific key in an object<\/h3>\n\n\n\n<p>Suppose you have a JSON document that represents information about a person:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">{\n   \"name\": \"John\",\n   \"age\": 25,\n   \"job\": \"MySQL Developer\"\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>To access the age key, you can use the following path expression: <\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">\"$.age\"<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this expression, the <code>$<\/code> represents the root of the document. The period (.) allows you to access a member of a JSON object. The <code>age<\/code> is the name of the member of the object.<\/p>\n\n\n\n<p>The following uses the <code><a href=\"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json_extract\/\">JSON_EXTRACT()<\/a><\/code> function to extract the <code>age<\/code> value from the above JSON object:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> \n  JSON_EXTRACT(\n    <span class=\"hljs-string\">'{\"name\":\"John\",\"age\":25,\"job\":\"MySQL Developer\"}'<\/span>, \n    <span class=\"hljs-string\">\"$.age\"<\/span>\n  ) age<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">25<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The query returns 25 as expected.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2) Accessing all members in an object<\/h3>\n\n\n\n<p>The following path accesses all members of the object:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">'$.*'<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this path: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The <code>$<\/code> represents the root of the JSON document <\/li>\n\n\n\n<li>The period (<code>.<\/code>) allows access to one or more members of an object.<\/li>\n\n\n\n<li>The <code>*<\/code> means all members of an object.<\/li>\n<\/ul>\n\n\n\n<p>Here&#8217;s the query that uses the path <code>\"$.*\"<\/code> to extract all values of the members of a JSON object:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> \n  JSON_EXTRACT(\n    <span class=\"hljs-string\">'{\"name\":\"John\",\"age\":25,\"job\":\"MySQL Developer\"}'<\/span>, \n    <span class=\"hljs-string\">\"$.*\"<\/span>\n  ) properties;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">+<span class=\"hljs-comment\">---------------------------------+<\/span>\n| properties                      |\n+<span class=\"hljs-comment\">---------------------------------+<\/span>\n| &#91;25, \"MySQL Developer\", \"John\"] |\n+<span class=\"hljs-comment\">---------------------------------+<\/span>\n1 row in <span class=\"hljs-keyword\">set<\/span> (<span class=\"hljs-number\">0.00<\/span> sec)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The <code>JSON_EXTRACT()<\/code> function returns a JSON array containing the values of all members of the JSON object.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">3) Accessing an array element by its index<\/h3>\n\n\n\n<p>Suppose you have the following JSON array:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">&#91;\"PHP\", \"MySQL\", \"JavaScript\"]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>To access the second element of the array, you use the path expression:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">'$&#91;1]'<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The following example uses the <code>JSON_EXTRACT()<\/code> method to retrieve the second element of the array:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> \n  JSON_EXTRACT(\n    <span class=\"hljs-string\">'&#91;\"PHP\",\"MySQL\",\"JavaScript\"]'<\/span>, \n    <span class=\"hljs-string\">\"$&#91;1]\"<\/span>\n  ) <span class=\"hljs-keyword\">result<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">+<span class=\"hljs-comment\">---------+<\/span>\n| result  |\n+<span class=\"hljs-comment\">---------+<\/span>\n| \"MySQL\" |\n+<span class=\"hljs-comment\">---------+<\/span>\n1 row in <span class=\"hljs-keyword\">set<\/span> (<span class=\"hljs-number\">0.00<\/span> sec)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">4) Accessing all elements in an array<\/h3>\n\n\n\n<p>To access all elements in a JSON array, you use the path expression:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">'$&#91;*]'<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>In this path expression:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>$<\/code> represents the root of the JSON document.<\/li>\n\n\n\n<li><code>[]<\/code> accesses array elements.<\/li>\n\n\n\n<li><code>*<\/code> means all elements.<\/li>\n<\/ul>\n\n\n\n<p>The following example uses the <code>JSON_EXTRACT()<\/code> function to get all elements of the array:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> \n  JSON_EXTRACT(\n    <span class=\"hljs-string\">'&#91;\"PHP\",\"MySQL\",\"JavaScript\"]'<\/span>, \n    <span class=\"hljs-string\">\"$&#91;*]\"<\/span>\n  ) <span class=\"hljs-keyword\">result<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>It returns a JSON array that contains all elements of the JSON array in the original JSON document:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">+<span class=\"hljs-comment\">--------------------------------+<\/span>\n| result                         |\n+<span class=\"hljs-comment\">--------------------------------+<\/span>\n| &#91;\"PHP\", \"MySQL\", \"JavaScript\"] |\n+<span class=\"hljs-comment\">--------------------------------+<\/span>\n1 row in <span class=\"hljs-keyword\">set<\/span> (<span class=\"hljs-number\">0.00<\/span> sec)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h3 class=\"wp-block-heading\">5) Combining path legs<\/h3>\n\n\n\n<p>Suppose you have the following JSON document:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-15\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">{\n  \"name\": \"John\",\n  \"age\": 25,\n  \"job\": \"MySQL Developer\",\n  \"skills\": &#91;\n    \"PHP\",\n    \"MySQL\",\n    \"JavaScript\"\n  ]\n}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-15\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>The following path expression accesses the second element of the <code>skills<\/code> array in the JSON document:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-16\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">$.skills&#91;1]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-16\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Here&#8217;s the query that extracts the second element of the <code>skills<\/code> array within the JSON document:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-17\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\"><span class=\"hljs-keyword\">SELECT<\/span> \n  JSON_EXTRACT(\n    <span class=\"hljs-string\">'{\"name\":\"John\",\"age\":25,\"job\":\"MySQL Developer\",\"skills\":&#91;\"PHP\",\"MySQL\",\"JavaScript\"]}'<\/span>, \n    <span class=\"hljs-string\">\"$.skills&#91;1]\"<\/span>\n  ) <span class=\"hljs-keyword\">result<\/span>;<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-17\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p>Output:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-18\" data-shcb-language-name=\"SQL (Structured Query Language)\" data-shcb-language-slug=\"sql\"><span><code class=\"hljs language-sql\">+<span class=\"hljs-comment\">---------+<\/span>\n| result  |\n+<span class=\"hljs-comment\">---------+<\/span>\n| \"MySQL\" |\n+<span class=\"hljs-comment\">---------+<\/span>\n1 row in <span class=\"hljs-keyword\">set<\/span> (<span class=\"hljs-number\">0.00<\/span> sec)<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-18\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">SQL (Structured Query Language)<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">sql<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use JSON path to navigate through the elements in a JSON document.<\/li>\n\n\n\n<li>Use the dollar (<code>$<\/code>) as the current JSON document.<\/li>\n\n\n\n<li>Use the period (<code>.<\/code>) to access a member of an object.<\/li>\n\n\n\n<li>Use the <code>[N]<\/code> to access the (N-1)<sup>th<\/sup> element of an array.<\/li>\n\n\n\n<li>Use the asterisk (<code>*<\/code>) to access all members of an object or all elements of an array.<\/li>\n<\/ul>\n<div class=\"helpful-block-content\" data-title=\"\">\n\t<header>\n\t\t<div class=\"wth-question\">Was this tutorial helpful? <\/div>\n\t\t<div class=\"wth-thumbs\">\n\t\t\t<button\n\t\t\t\tdata-post=\"11999\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/\"\n\t\t\t\tdata-post-title=\"MySQL JSON Path\"\n\t\t\t\tdata-response=\"1\"\n\t\t\t\tclass=\"wth-btn-rounded wth-yes-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\tclass=\"feather feather-thumbs-up block w-full h-full\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> Yes <\/span>\n\t\t\t<\/button>\n\n\t\t\t<button\n\t\t\t\tdata-response=\"0\"\n\t\t\t\tdata-post=\"11999\"\n\t\t\t\tdata-post-url=\"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/\"\n\t\t\t\tdata-post-title=\"MySQL JSON Path\"\n\t\t\t\tclass=\"wth-btn-rounded wth-no-btn\"\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\txmlns=\"http:\/\/www.w3.org\/2000\/svg\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17\"\n\t\t\t\t\t><\/path>\n\t\t\t\t<\/svg>\n\t\t\t\t<span class=\"sr-only\"> No <\/span>\n\t\t\t<\/button>\n\t\t<\/div>\n\t<\/header>\n\n\t<div class=\"wth-form hidden\">\n\t\t<div class=\"wth-form-wrapper\">\n\t\t\t<div class=\"wth-title\"><\/div>\n\t\t\t\n\t\t\t<textarea class=\"wth-message\"><\/textarea>\n\n\t\t\t<button class=\"btn btn-primary wth-btn-submit\">Send<\/button>\n\t\t\t<button class=\"btn wth-btn-cancel\">Cancel<\/button>\n\t\t\n\t\t<\/div>\n\t<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Summary: in this tutorial, you will learn about MySQL JSON path and how to use it to specify and navigate through elements in a JSON document. What is JSON path? JSON path is a way to specify and navigate through the elements in a JSON document. It serves as a roadmap to locate specific pieces [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":11973,"menu_order":3,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-11999","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>MySQL JSON Path<\/title>\n<meta name=\"description\" content=\"In this tutorial, you will learn about MySQL JSON path and how to use it to specify and navigate through the elements in a JSON document.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"MySQL JSON Path\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you will learn about MySQL JSON path and how to use it to specify and navigate through the elements in a JSON document.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/\" \/>\n<meta property=\"og:site_name\" content=\"MySQL Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-23T12:56:46+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-json\\\/mysql-json-path\\\/\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-json\\\/mysql-json-path\\\/\",\"name\":\"MySQL JSON Path\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\"},\"datePublished\":\"2023-10-31T13:49:15+00:00\",\"dateModified\":\"2023-11-23T12:56:46+00:00\",\"description\":\"In this tutorial, you will learn about MySQL JSON path and how to use it to specify and navigate through the elements in a JSON document.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-json\\\/mysql-json-path\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-json\\\/mysql-json-path\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-json\\\/mysql-json-path\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"MySQL JSON\",\"item\":\"https:\\\/\\\/www.mysqltutorial.org\\\/mysql-json\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"MySQL JSON Path\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mysqltutorial.org\\\/#website\",\"url\":\"https:\\\/\\\/www.mysqltutorial.org\\\/\",\"name\":\"MySQL Tutorial\",\"description\":\"A comprehensive MySQL Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mysqltutorial.org\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"MySQL JSON Path","description":"In this tutorial, you will learn about MySQL JSON path and how to use it to specify and navigate through the elements in a JSON document.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/","og_locale":"en_US","og_type":"article","og_title":"MySQL JSON Path","og_description":"In this tutorial, you will learn about MySQL JSON path and how to use it to specify and navigate through the elements in a JSON document.","og_url":"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/","og_site_name":"MySQL Tutorial","article_modified_time":"2023-11-23T12:56:46+00:00","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/","url":"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/","name":"MySQL JSON Path","isPartOf":{"@id":"https:\/\/www.mysqltutorial.org\/#website"},"datePublished":"2023-10-31T13:49:15+00:00","dateModified":"2023-11-23T12:56:46+00:00","description":"In this tutorial, you will learn about MySQL JSON path and how to use it to specify and navigate through the elements in a JSON document.","breadcrumb":{"@id":"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.mysqltutorial.org\/mysql-json\/mysql-json-path\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.mysqltutorial.org\/"},{"@type":"ListItem","position":2,"name":"MySQL JSON","item":"https:\/\/www.mysqltutorial.org\/mysql-json\/"},{"@type":"ListItem","position":3,"name":"MySQL JSON Path"}]},{"@type":"WebSite","@id":"https:\/\/www.mysqltutorial.org\/#website","url":"https:\/\/www.mysqltutorial.org\/","name":"MySQL Tutorial","description":"A comprehensive MySQL Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mysqltutorial.org\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/11999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/comments?post=11999"}],"version-history":[{"count":3,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/11999\/revisions"}],"predecessor-version":[{"id":12472,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/11999\/revisions\/12472"}],"up":[{"embeddable":true,"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/pages\/11973"}],"wp:attachment":[{"href":"https:\/\/www.mysqltutorial.org\/wp-json\/wp\/v2\/media?parent=11999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}