Other answer is probably better but if you need to use an existing structure... You can create it dynamically (pseudo code)
int count = ....;
var sections = new Sectionquery[count];
for (int i=0; i < count; i++)
{
sections[i].id = ...
sections[i].name = ...
}
newPost.sectionQueries = sections ;
You can also create it statically using the same layout you have already used. Although typically that would not be useful for the the structure you gave. But it wouldn't be used for PostSections either. Pseudo code (google for 'c# create array statically')
var newPost = new PostSections()
{
...
sectionQueries = new Sectionquery[]
{
new {
"1", // id
"xxx", // name
...
},
new {
"2", // id
"yyy", // name
...
},
}
};