Skip to content

Commit

Permalink
📚 docs: update README.md #4
Browse files Browse the repository at this point in the history
  • Loading branch information
pnguyen215 committed Jan 11, 2025
1 parent 2976b8d commit 1be3381
Showing 1 changed file with 34 additions and 2 deletions.
36 changes: 34 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,32 @@ Given the `JSON` string
{
"required": ["accession"]
}
],
"animals": [
{
"name": "Meowsy",
"species": "cat",
"foods": {
"likes": ["tuna", "catnip"],
"dislikes": ["ham", "zucchini"]
}
},
{
"name": "Barky",
"species": "dog",
"foods": {
"likes": ["bones", "carrots"],
"dislikes": ["tuna"]
}
},
{
"name": "Purrpaws",
"species": "cat",
"foods": {
"likes": ["mice"],
"dislikes": ["cookies"]
}
}
]
}
```
Expand All @@ -100,9 +126,9 @@ A `fj` path is designed to be represented as a sequence of elements divided by a

In addition to the `.` symbol, several other characters hold special significance, such as `|`, `#`, `@`, `\`, `*`, `!`, and `?`.

## Basic
## Access values

In most situations, you'll simply need to access values using the object name or array index.
- **Basic**: in most situations, you'll simply need to access values using the object name or array index.

```shell
> id # "http://subs/base-sample-schema.json"
Expand All @@ -114,3 +140,9 @@ In most situations, you'll simply need to access values using the object name or
> oneOf.0.required # ["alias", "team"]
> oneOf.0.required.1 # "team"
```

- **Wildcards**: A key can include special wildcard symbols like `*` and `?`. The `*` matches any sequence of characters (including none), while `?` matches exactly one character.

```shell
> anim*ls.1.name # "Barky"
```

0 comments on commit 1be3381

Please sign in to comment.