fix subquery examples
This commit is contained in:
parent
f40fe4ac37
commit
3e35b37021
|
@ -81,7 +81,7 @@ The dot and wildcard characters can be escaped with '\'.
|
||||||
```
|
```
|
||||||
To query an array:
|
To query an array:
|
||||||
```
|
```
|
||||||
"friends.#[last="Murphy"].first" >> "James"
|
`friends.#[last="Murphy"].first` >> "James"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Result Type
|
## Result Type
|
||||||
|
@ -165,7 +165,7 @@ for _,name := range result.Array() {
|
||||||
You can also query an object inside an array:
|
You can also query an object inside an array:
|
||||||
|
|
||||||
```go
|
```go
|
||||||
name := gjson.Get(json, "programmers.#[lastName="Hunter"].firstName")
|
name := gjson.Get(json, `programmers.#[lastName="Hunter"].firstName`)
|
||||||
println(name.String()) // prints "Elliotte"
|
println(name.String()) // prints "Elliotte"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user