@Janicen : Created a sample service. Please check below.
// result: INFOTABLE dataShape: "RootEntityList"
let thinglist = ThingTemplates["testTT"].GetImplementingThings(); //Get all things associated with testTT thing template
var thingName;
var params = {
infoTableName: "MyInfoTable",
dataShapeName: "nameds"
};
var MyInfoTable = Resources["InfoTableFunctions"].CreateInfoTableFromDataShape(params); // Creating an empty infotable from 'nameds' data shape which has a 'name' field with 'String' as base type
for each (var row in thinglist.rows) {
// Now each row is already assigned to the row variable in the loop
thingName= row.name;
MyInfoTable.AddRow({name: thingName}); // adding name of things in the rows of infotable
}
me.info1=MyInfoTable; //Here on the last row I am storing the thing names in an infotable property