Skip to content

Commit

Permalink
Update jsoniq-tutorial.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLichtenberger authored Dec 2, 2023
1 parent 061ee33 commit 1dd47d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/jsoniq-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,14 +210,14 @@ jn:store('json-path1','mydoc.jn','[{"test": "test string"},{"test": ["a", {"blab

```xquery
let $doc := jn:doc('json-path1','mydoc.jn')
let $stats := jn:create-cas-index($doc, 'xs:string', '/[]/test/[]')
let $stats := jn:create-cas-index($doc, 'xs:string', '//[]')
return {"revision": sdb:commit($doc)}
```

```xquery
let $doc := jn:doc('json-path1','mydoc.jn')
let $casIndexNumber := jn:find-cas-index($doc, 'xs:string', '//[]')
for $node in jn:scan-cas-index($doc, $casIndexNumber, 'b', '==', ())
let $casIndexNumber := jn:find-cas-index($doc, 'xs:string', '/[]/test/[]')
for $node in jn:scan-cas-index($doc, $casIndexNumber, 'b', '==', '/[]/test/[]')
order by sdb:revision($node), sdb:nodekey($node)
return {"nodeKey": sdb:nodekey($node), "node": $node, "path": sdb:path(sdb:select-parent($node))}
```

0 comments on commit 1dd47d5

Please sign in to comment.