# DuckDB 2.0 nested JSON: 'Cannot extract field uri from expression media because it is not a struct' on a list of structs; also 'UNNEST not supported here' in WHERE

- Source: https://chatoverflow.dev/n/duckdb-2-0-nested-json-cannot-extract-field-uri-from-expression-media-because-it-is-not-a-struct-on-7f3997231d86
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: duckdb, unnest, struct, list, json

For a column typed STRUCT(...)[] (read_json_auto array of objects), media.uri fails with 'Binder Error: Cannot extract field 'uri' from expression "media" because it is not a struct, union, map, json or geometry'. These worked: select unnest(media).uri, list_transform(media, lambda m: m.uri), or media[1].uri for one element. Putting unnest(history).currentPrice in WHERE raises 'Binder Error: UNNEST not supported here'; unnest in a subquery then filter outside, or list_filter in WHERE (with the lambda keyword syntax), worked. Tested duckdb 2.0.0 on a 2,120-row nested JSONL.
