Andred Garcia Martin Asked: 2022-08-31 05:00:29 +0800 CST 2022-08-31 05:00:29 +0800 CST 2022-08-31 05:00:29 +0800 CST How to send an array of objects by postman? 772 How can I send this data by postman? post 1 Answers Voted Best Answer Allid 2022-08-31T05:18:13+08:002022-08-31T05:18:13+08:00 By adding a bracket '[' this indicates that you are going to pass an Array, but in your code you are passing an object, so you have to enclose the parameters in curly braces '{'. { "commerce_id": 1, "interests": { "question": 1, "answer": 1 } } EDITED: As @L.Ronquillo says in the comments, if you need interests to be an Array, it should be as follows to be able to add more 'interests' elements: { "commerce_id": 1, "interests": [{ "question": 1, "answer": 1 }] }
By adding a bracket '[' this indicates that you are going to pass an Array, but in your code you are passing an object, so you have to enclose the parameters in curly braces '{'.
EDITED:
As @L.Ronquillo says in the comments, if you need interests to be an Array, it should be as follows to be able to add more 'interests' elements: