Reputation: 285
I'm trying to pass an Json array to a web api and get all that values to a single array or a list in the web api.
to test this I'm using Postman app in Google. This is my input data
[{
"ID":"1",
"ID":"2",
"ID":"3"
}]
What I want is to pass these data to a post method and get all these data into a single array or a list. How can I do this?
I need to execute the following query
Select * from table where ID in ("I need the data list here");
To do that I have to get all the data sent to from the json to a single array or a list.
Upvotes: 0
Views: 1378
Reputation: 660
{} = json object. [] = json array. you are passing a json array with one object in it
[
{"ID":"1"},
{"ID":"2"},
{"ID":"3"}
]
Upvotes: 2