Skip to content

Commit 22336b6

Browse files
Update json-query-transact-sql.md (#10231)
1 parent 2f7fd66 commit 22336b6

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)