jeudi 26 décembre 2019

Nested Array to Query Params for Filters in Searching

I have:

[
    {
        id:
            eq: '1234'
    },
    {
        description:
            like: 'desc'
    }
]

How to transform it to query parameters to:

?filter[id][eq]=1234&filter[description][like]=desc

since the API needed the format like so for the filters?




Aucun commentaire:

Enregistrer un commentaire