How to use query parameters, as “_fields”, to filter data inside an array in the REST API?

Question

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 any relevant.

0
Marcel 2 months 2022-05-26T20:26:01-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse