Add getValues to JSON
This commit is contained in:
parent
5760da96eb
commit
b2704dcbcc
|
@ -122,6 +122,16 @@ getProperty prop (VObject xs) =
|
|||
Just (type ** (_, val)) => Just (type ** val)
|
||||
```
|
||||
|
||||
Return the values from an object.
|
||||
|
||||
```idris
|
||||
export
|
||||
getValues : (object : JSONValue TObject)
|
||||
-> (types : List JSONType ** DList JSONType JSONValue types)
|
||||
getValues (VObject xs) =
|
||||
dMap' (\t, (k, v) => (t ** v)) xs
|
||||
```
|
||||
|
||||
Recursively apply a filter to a JSON structure.
|
||||
|
||||
```idris
|
||||
|
|
Loading…
Reference in a new issue