I am trying to create a custom Api in magneto2. Its a POST CALL in which I try to send an associative array as shown below,
{ "data": { "testData": { "title": "Test 01", "place": { "key": "value" } } } }
In the above format, I give the param annotation as string[] . Its work If I did not pass place data to it. But if I pass the place data my throwing error, as shown below,
Array to string conversion
Actual problem: I cannot pass an associative array in the query parameter. Can someone help me with this?
I also tried to create a custom object type. In this, too, I can only give the type string[] . Therefore, I cannot add more and more json data to it.
source share