How To Pass The Value To Let Php Code Convert It To Php Array?

Error Description:

try to get products by filter, filter_variants. The value of filter_variants has to be array. The code

pass an array of '[5678]' to API 'products' via HTTP-GET.

response error as:

Error Message:array_keys() expects parameter 1 to be array, string given. Error at: app/functions/fn.catalog.php, line: 7064

Question

Anyone know how to pass the value to let php code convert it to php array?

Please clarify your question with more details

It would appear that you are not properly specifying your Features/Filters in the JSON you (or your application) is passing to the API. Review your JSON data.

Thanks for your reply, I can not find the feature/filters in the develop document, can you please guide me ? Very appreciate !

Can only refer you to the API documentation.... Probably easiest is to GET a product with features and filters and look at how the JSON is structured.

Thank you very much for your reply, the API document still not clear enough about filters/features, really need to improve.