Skip to content

Commit db18567

Browse files
rwestMSFTlearn-build-service-prod[bot]jermyh-geneyx
authored
Update json-query-transact-sql.md (#10231) (#35942)
Co-authored-by: learn-build-service-prod[bot] <113403604+learn-build-service-prod[bot]@users.noreply.github.com> Co-authored-by: jermyh-geneyx <jermyh@geneyx.com>
2 parents 0293f3f + 22336b6 commit db18567

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/t-sql/functions/json-query-transact-sql.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@ DECLARE @j AS JSON = '{
107107
The path `$.credit_cards` points to a JSON array where each element is a valid JSON object. Now, the `JSON_QUERY` function can be used with array wildcard support to return all or specific values of the `type` property like:
108108

109109
```sql
110-
SELECT JSON_QUERY(@j, '$.creditcards[*].type' WITH ARRAY WRAPPER);
110+
SELECT JSON_QUERY(@j, '$.credit_cards[*].type' WITH ARRAY WRAPPER);
111111
```
112112

113113
The following table shows various examples of SQL/JSON path expression with wildcard and the return value using `JSON_QUERY WITH ARRAY WRAPPER`.
114114

115115
| Path | Return value |
116116
| --- | --- |
117-
| `$.creditcards[0].type` | `["jcb"]` |
117+
| `$.credit_cards[0].type` | `["jcb"]` |
118118
| `$.credit_cards[*].type` | `["jcb","diners-club-carte-blanche","jcb","maestro","instapayment"]` |
119119
| `$.credit_cards[0, 2].type` | `["jcb","jcb"]` |
120120
| `$.credit_cards[1 to 3].type` | `["diners-club-carte-blanche","jcb","maestro"]` |

0 commit comments

Comments
 (0)