{"id":3555,"date":"2024-03-13T22:29:47","date_gmt":"2024-03-13T15:29:47","guid":{"rendered":"https:\/\/www.sqlservertutorial.net\/?page_id=3555"},"modified":"2024-03-13T22:29:49","modified_gmt":"2024-03-13T15:29:49","slug":"sql-server-json-path-expressions","status":"publish","type":"page","link":"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/","title":{"rendered":"SQL Server JSON Path Expressions"},"content":{"rendered":"\n<p><strong>Summary<\/strong>: in this tutorial, you will learn about JSON path expressions and how to use them to locate elements in a JSON document.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='introduction-to-the-json-path-expressions'>Introduction to the JSON Path Expressions <a href=\"#introduction-to-the-json-path-expressions\" class=\"anchor\" id=\"introduction-to-the-json-path-expressions\" title=\"Anchor for Introduction to the JSON Path Expressions\">#<\/a><\/h2>\n\n\n\n<p>JSON path expressions offer a way to navigate through JSON documents and allow you to specify the path to specific data elements.<\/p>\n\n\n\n<p>A JSON path expression has two main parts:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The optional path mode, with a value of <code>lax<\/code> or <code>strict<\/code>.<\/li>\n\n\n\n<li>The path itself.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id='path-mode'>Path mode <a href=\"#path-mode\" class=\"anchor\" id=\"path-mode\" title=\"Anchor for Path mode\">#<\/a><\/h3>\n\n\n\n<p>The path mode controls how SQL Server handles non-existent paths. SQL Server supports two path modes: <code>lax <\/code>and <code>strict<\/code>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>lax<\/code>: in the <code>lax<\/code> mode, the function returns <code>null<\/code> if the JSON path expression contains an error or does not exist in the JSON document.<\/li>\n\n\n\n<li><code>strict<\/code>: In the <code>strict<\/code> mode, the function <strong>raises an error<\/strong> if the JSON path expression contains an error or does not exist.<\/li>\n<\/ul>\n\n\n\n<p>To specify a path mode, use the keyword <code>lax<\/code> or <code>strict<\/code> at the beginning of the path expression. The default is lax:<\/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\">'lax json_path'\n'strict json_path'<\/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<h3 class=\"wp-block-heading\" id='path'>Path <a href=\"#path\" class=\"anchor\" id=\"path\" title=\"Anchor for Path\">#<\/a><\/h3>\n\n\n\n<p>A JSON path is one or a combination of some of the following operators:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Operator<\/th><th>Meaning<\/th><\/tr><\/thead><tbody><tr><td><code>$<\/code><\/td><td>Represent the root object of the JSON document.<\/td><\/tr><tr><td><code>.<\/code><\/td><td>Access a property of a JSON object.<\/td><\/tr><tr><td><code>[n]<\/code><\/td><td>Access the nth element of a JSON array.<\/td><\/tr><tr><td><code>*<\/code><\/td><td>Match all elements in a JSON array<\/td><\/tr><tr><td><code>?()<\/code><\/td><td>Filter expression to select JSON elements conditionally<\/td><\/tr><tr><td><code>@<\/code><\/td><td>Reference the current element within a filter expression<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>In practice, you use JSON path expressions when calling the following JSON functions: <\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json_value\/\">JSON_VALUE()<\/a>  &#8211; Extract a scalar value from a JSON document.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json_query\/\">JSON_QUERY()<\/a> &#8211; Extract an object or an array from a JSON document.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json_modify\/\">JSON_MODIFY()<\/a>  &#8211; Insert, Update, and Delete elements in a JSON document.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-openjson\/\">OPENJSON()<\/a> &#8211; Create a relational view of a JSON document.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id='json-path-expression-examples'>JSON Path Expression Examples <a href=\"#json-path-expression-examples\" class=\"anchor\" id=\"json-path-expression-examples\" title=\"Anchor for JSON Path Expression Examples\">#<\/a><\/h2>\n\n\n\n<p>We&#8217;ll take some examples of using the JSON path expressions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id='1-using-json-path-expression-to-extract-a-property-of-a-json-object'>1) Using JSON Path Expression to extract a property of a JSON object <a href=\"#1-using-json-path-expression-to-extract-a-property-of-a-json-object\" class=\"anchor\" id=\"1-using-json-path-expression-to-extract-a-property-of-a-json-object\" title=\"Anchor for 1) Using JSON Path Expression to extract a property of a JSON object\">#<\/a><\/h3>\n\n\n\n<p>The following example uses the JSON path expression <code>'$.name'<\/code> to extract the name property of a JSON object:<\/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\"><span class=\"hljs-keyword\">SELECT<\/span> \n  JSON_VALUE(\n    <span class=\"hljs-string\">'{\"name\": \"John\",\"age\":22}'<\/span>, <span class=\"hljs-string\">'$.name'<\/span>\n  ) <span class=\"hljs-keyword\">name<\/span>;<\/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>Output:<\/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\">name\n<span class=\"hljs-comment\">----<\/span>\nJohn<\/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<h3 class=\"wp-block-heading\" id='2-using-json-path-expressions-with-lax-or-strict-mode'>2) Using JSON path expressions with lax or strict mode <a href=\"#2-using-json-path-expressions-with-lax-or-strict-mode\" class=\"anchor\" id=\"2-using-json-path-expressions-with-lax-or-strict-mode\" title=\"Anchor for 2) Using JSON path expressions with lax or strict mode\">#<\/a><\/h3>\n\n\n\n<p>The following example uses the JSON path expression <code>'$.email'<\/code> to extract the email property of a JSON object:<\/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\"><span class=\"hljs-keyword\">SELECT<\/span> \n  JSON_VALUE(\n    <span class=\"hljs-string\">'{\"name\": \"John\",\"age\":22}'<\/span>, <span class=\"hljs-string\">'$.email'<\/span>\n  ) email;<\/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>Output:<\/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\">email\n<span class=\"hljs-comment\">-----<\/span>\nNULL<\/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 example, the JSON path expression <code>'$.email'<\/code> does not exist in the JSON document; therefore, the function returns <code>NULL<\/code>. It does not cause an error because the path mode defaults to <code>lax<\/code>. <\/p>\n\n\n\n<p>To instruct SQL Server to use the strict mode, you can use the <code>strict<\/code> keyword at the beginning of the JSON path expression as follows:<\/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_VALUE(\n    <span class=\"hljs-string\">'{\"name\": \"John\",\"age\":22}'<\/span>, <span class=\"hljs-string\">'strict $.email'<\/span>\n  ) email;<\/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>Error:<\/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\">Property cannot be found on the specified JSON path.<\/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<h3 class=\"wp-block-heading\" id='3-using-json-path-expressions-to-extract-a-json-array-element'>3) Using JSON path expressions to extract a JSON array element <a href=\"#3-using-json-path-expressions-to-extract-a-json-array-element\" class=\"anchor\" id=\"3-using-json-path-expressions-to-extract-a-json-array-element\" title=\"Anchor for 3) Using JSON path expressions to extract a JSON array element\">#<\/a><\/h3>\n\n\n\n<p>The following example uses the JSON path expression <code>'$.skills[0]'<\/code> to extract the first element of an array in a JSON document:<\/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\"><span class=\"hljs-keyword\">SELECT<\/span> \n  JSON_VALUE(\n    <span class=\"hljs-string\">'{\"name\": \"John\",\"age\":22, \"skill\": &#91;\"SQL Server\",\"C#\"]}'<\/span>, \n    <span class=\"hljs-string\">'$.skill&#91;0]'<\/span>\n  ) skill;<\/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>Output:<\/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\">skill\n<span class=\"hljs-comment\">----------<\/span>\nSQL Server<\/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>Here is the breakdown of the JSON path expression <code>$.skill[0]<\/code>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>$<\/code> represents the root object.<\/li>\n\n\n\n<li><code>.skill<\/code> accesses the <code>skill<\/code> property within the root object.<\/li>\n\n\n\n<li><code>[0]<\/code> accesses the first element of the <code>skill<\/code> array.<\/li>\n<\/ul>\n\n\n\n<p>So the JSON path expression <code>$.skill[0]<\/code> selects the value of the first element in the <code>skill<\/code> array within the root object of the JSON document.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id='summary'>Summary <a href=\"#summary\" class=\"anchor\" id=\"summary\" title=\"Anchor for Summary\">#<\/a><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use JSON path expressions to locate elements within a JSON document.<\/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=\"3555\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/\"\n\t\t\t\tdata-post-title=\"SQL Server JSON Path Expressions\"\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=\"3555\"\n\t\t\t\tdata-post-url=\"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/\"\n\t\t\t\tdata-post-title=\"SQL Server JSON Path Expressions\"\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>In this tutorial, you will learn about JSON path expressions and how to use them to locate elements in a JSON document.<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":3480,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3555","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>SQL Server JSON Path Expressions<\/title>\n<meta name=\"description\" content=\"In this tutorial, you will learn about JSON path expressions and how to use them to locate 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.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server JSON Path Expressions\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, you will learn about JSON path expressions and how to use them to locate elements in a JSON document.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/\" \/>\n<meta property=\"og:site_name\" content=\"SQL Server Tutorial\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-13T15:29:49+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\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.sqlservertutorial.net\\\/sql-server-json-functions\\\/sql-server-json-path-expressions\\\/\",\"url\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-json-functions\\\/sql-server-json-path-expressions\\\/\",\"name\":\"SQL Server JSON Path Expressions\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/#website\"},\"datePublished\":\"2024-03-13T15:29:47+00:00\",\"dateModified\":\"2024-03-13T15:29:49+00:00\",\"description\":\"In this tutorial, you will learn about JSON path expressions and how to use them to locate elements in a JSON document.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-json-functions\\\/sql-server-json-path-expressions\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-json-functions\\\/sql-server-json-path-expressions\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-json-functions\\\/sql-server-json-path-expressions\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server JSON Functions\",\"item\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/sql-server-json-functions\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SQL Server JSON Path Expressions\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/#website\",\"url\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/\",\"name\":\"SQL Server Tutorial\",\"description\":\"The Practical SQL Server Tutorial\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sqlservertutorial.net\\\/?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":"SQL Server JSON Path Expressions","description":"In this tutorial, you will learn about JSON path expressions and how to use them to locate 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.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server JSON Path Expressions","og_description":"In this tutorial, you will learn about JSON path expressions and how to use them to locate elements in a JSON document.","og_url":"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/","og_site_name":"SQL Server Tutorial","article_modified_time":"2024-03-13T15:29:49+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/","url":"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/","name":"SQL Server JSON Path Expressions","isPartOf":{"@id":"https:\/\/www.sqlservertutorial.net\/#website"},"datePublished":"2024-03-13T15:29:47+00:00","dateModified":"2024-03-13T15:29:49+00:00","description":"In this tutorial, you will learn about JSON path expressions and how to use them to locate elements in a JSON document.","breadcrumb":{"@id":"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/sql-server-json-path-expressions\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlservertutorial.net\/"},{"@type":"ListItem","position":2,"name":"SQL Server JSON Functions","item":"https:\/\/www.sqlservertutorial.net\/sql-server-json-functions\/"},{"@type":"ListItem","position":3,"name":"SQL Server JSON Path Expressions"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlservertutorial.net\/#website","url":"https:\/\/www.sqlservertutorial.net\/","name":"SQL Server Tutorial","description":"The Practical SQL Server Tutorial","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlservertutorial.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/3555","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/comments?post=3555"}],"version-history":[{"count":5,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/3555\/revisions"}],"predecessor-version":[{"id":3560,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/3555\/revisions\/3560"}],"up":[{"embeddable":true,"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/pages\/3480"}],"wp:attachment":[{"href":"https:\/\/www.sqlservertutorial.net\/wp-json\/wp\/v2\/media?parent=3555"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}