The Select
LINQ operator Projects each element of a sequence into a new form. what you are you doing will project only one element with 'Id' as index so it will return one element only not an array of Id's
here you should specifiy that you want the ID
@helper PrintProductYearChart(IEnumerable<DynamicNode> products)
{
var res = products.select(x => x.Id).ToArray();
}