Add getValues to JSON

This commit is contained in:
Nathan McCarty 2025-01-27 22:45:18 -05:00
parent 5760da96eb
commit b2704dcbcc

View file

@ -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