mirror of
https://github.com/sigmasternchen/libargo
synced 2025-03-15 21:28:54 +00:00
Update README.md
This commit is contained in:
parent
76955568ba
commit
051d364bd9
1 changed files with 5 additions and 0 deletions
|
@ -126,11 +126,16 @@ object_selector := key
|
||||||
```
|
```
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
`.foobar` will select the corresponding value for the key "foobar" from an object
|
`.foobar` will select the corresponding value for the key "foobar" from an object
|
||||||
|
|
||||||
`.[4]` will select the 5th (index counting starts with 0) from an array
|
`.[4]` will select the 5th (index counting starts with 0) from an array
|
||||||
|
|
||||||
`.[0].foo` will select the key "foo" from the first entry in an array
|
`.[0].foo` will select the key "foo" from the first entry in an array
|
||||||
|
|
||||||
`.foo.bar.[0]` will select the first element in the key "bar" in the key "foo" in an object
|
`.foo.bar.[0]` will select the first element in the key "bar" in the key "foo" in an object
|
||||||
|
|
||||||
|
|
||||||
Note: As with the `json_array_get()` and `json_object_get()` the returned value is a clone and has to be freed seperately.
|
Note: As with the `json_array_get()` and `json_object_get()` the returned value is a clone and has to be freed seperately.
|
||||||
|
|
||||||
### Stringify
|
### Stringify
|
||||||
|
|
Loading…
Reference in a new issue