Updated Node.js sample code for fields