Filter with JSON-API

Created on 3 November 2023, about 1 year ago
Updated 16 February 2024, 9 months ago

How to use Filter in JSON-API?
I have a data field with taxonomy. Example with normal Taxonomy
https://www.drupal.org/docs/core-modules-and-themes/core-modules/jsonapi...

filter[taxonomy_term--tags][condition][path]=field_tags.name
filter[taxonomy_term--tags][condition][operator]=IN
filter[taxonomy_term--tags][condition][value][]=tagname

in my case:
field: field_n_od_work
sub field name: work_taxonomy

field_n_od_work.work_taxonomy
I can filter with tid, how kann i use name?
field_n_od_work.work_taxonomy.name not working

Or do I have to load the vocabulary here and search for the names and get the tid and then search with the tid? This is how I approached the loading. Load the taxonomy after loading the nodes.

💬 Support request
Status

Fixed

Version

2.0

Component

Miscellaneous

Created by

🇩🇪Germany HeavyStoneHead

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024