ernalNameOrTitle(&quot;ModifiedBy&quot;);
// get the field with the internal name 'ModifiedBy' for list 'My List'
const field2: IFieldInfo = await sp.web.lists.getByTitle(&quot;My List&quot;).fields.getByInternalNameOrTitle(&quot;ModifiedBy&quot;)();

// we can use this 'field' variable to run more queries on the field:
const r = await field.select(&quot;Id&quot;)();

// log the field Id to console
console.log(r.Id);
</code></pre>
<h3 id="create-a-field-using-an-xml-schema">Create a Field using an XML schem