How to use query parameters, as "_fields", to filter data inside an array in the REST API?
How to handle this endpoint
/wp-json/wc/v3/products/?_fields=name,meta_data
[
{
name: Test,
meta_data: [
{
id: 478626,
key: _wp_page_template,
value: default
},
to achieve this?
[
{
name: Test,
meta_data: [
{
value: default
},
I took a look at the documentation, but I didn't find anything relevant.
Since meta_data
is an array
, this syntax DOESN'T work:
/wp-json/wc/v3/products/?_fields=name,meta_data.value