forked from mirror/gjson
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:
|
||||
```
|
||||
"friends.#[last="Murphy"].first" >> "James"
|
||||
`friends.#[last="Murphy"].first` >> "James"
|
||||
```
|
||||
|
||||
## Result Type
|
||||
|
@ -165,7 +165,7 @@ for _,name := range result.Array() {
|
|||
You can also query an object inside an array:
|
||||
|
||||
```go
|
||||
name := gjson.Get(json, "programmers.#[lastName="Hunter"].firstName")
|
||||
name := gjson.Get(json, `programmers.#[lastName="Hunter"].firstName`)
|
||||
println(name.String()) // prints "Elliotte"
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue